MCPcopy Index your code
hub / github.com/tailscale/tailscale / BenchmarkLog

Function BenchmarkLog

tsweb/tsweb_test.go:1121–1134  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1119}
1120
1121func BenchmarkLog(b *testing.B) {
1122 b.ReportAllocs()
1123 rh := handlerFunc(func(w http.ResponseWriter, r *http.Request) error {
1124 // Implicit 200 OK.
1125 return nil
1126 })
1127 h := StdHandler(rh, HandlerOptions{})
1128 req := httptest.NewRequest("GET", "/", nil)
1129 rw := new(httptest.ResponseRecorder)
1130 for range b.N {
1131 *rw = httptest.ResponseRecorder{}
1132 h.ServeHTTP(rw, req)
1133 }
1134}
1135
1136func TestHTTPError_Unwrap(t *testing.T) {
1137 wrappedErr := fmt.Errorf("wrapped")

Callers

nothing calls this directly

Calls 3

handlerFuncFuncType · 0.85
StdHandlerFunction · 0.85
ServeHTTPMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…