MCPcopy Index your code
hub / github.com/felixge/httpsnoop / BenchmarkWrap

Function BenchmarkWrap

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

Source from the content-addressed store, hash-verified

6)
7
8func BenchmarkWrap(b *testing.B) {
9 b.ReportAllocs()
10 b.StopTimer()
11 resp := httptest.NewRecorder()
12
13 b.ReportAllocs()
14 b.StartTimer()
15 for b.Loop() {
16 wrapped := Wrap(resp, Hooks{})
17 if wrapped == nil {
18 b.Fatal()
19 }
20 }
21}
22
23func BenchmarkWrappedWriteWithHook(b *testing.B) {
24 var total int64

Callers

nothing calls this directly

Calls 1

WrapFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…