MCPcopy Create free account
hub / github.com/felixge/httpsnoop / BenchmarkWrappedWriteNoHook

Function BenchmarkWrappedWriteNoHook

wrap_bench_test.go:46–58  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

44}
45
46func BenchmarkWrappedWriteNoHook(b *testing.B) {
47 w := httptest.NewRecorder()
48 ww := Wrap(w, Hooks{})
49 payload := []byte("hello world")
50 b.ReportAllocs()
51 b.ResetTimer()
52 for i := 0; i < b.N; i++ {
53 _, err := ww.Write(payload)
54 if err != nil {
55 b.Fatal()
56 }
57 }
58}

Callers

nothing calls this directly

Calls 2

WrapFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…