(b *testing.B)
| 114 | } |
| 115 | |
| 116 | func BenchmarkSnapshotHandle(b *testing.B) { |
| 117 | // TODO(maruel): We should hook runtime.Stack() to make it a deterministic |
| 118 | // output with internaltest.StaticPanicwebOutput(). |
| 119 | b.ReportAllocs() |
| 120 | req := httptest.NewRequest("GET", "/", nil) |
| 121 | b.ResetTimer() |
| 122 | for i := 0; i < b.N; i++ { |
| 123 | w := httptest.NewRecorder() |
| 124 | SnapshotHandler(w, req) |
| 125 | if w.Code != 200 { |
| 126 | b.Fatalf("%d\n%s", w.Code, w.Body.String()) |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | func dummy(ctx context.Context, a1, a2, a3, a4, a5, a6, a7, a8, a9 *int) { |
| 132 | <-ctx.Done() |
nothing calls this directly
no test coverage detected
searching dependent graphs…