MCPcopy Index your code
hub / github.com/maruel/panicparse / BenchmarkSnapshotHandle

Function BenchmarkSnapshotHandle

stack/webstack/webstack_test.go:116–129  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

114}
115
116func 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
131func dummy(ctx context.Context, a1, a2, a3, a4, a5, a6, a7, a8, a9 *int) {
132 <-ctx.Done()

Callers

nothing calls this directly

Calls 2

SnapshotHandlerFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…