MCPcopy
hub / github.com/gin-gonic/gin / runRequest

Function runRequest

benchmarks_test.go:148–160  ·  view source on GitHub ↗
(B *testing.B, r *Engine, method, path string)

Source from the content-addressed store, hash-verified

146func (m *mockWriter) WriteHeader(int) {}
147
148func runRequest(B *testing.B, r *Engine, method, path string) {
149 // create fake request
150 req, err := http.NewRequest(method, path, nil)
151 if err != nil {
152 panic(err)
153 }
154 w := newMockWriter()
155 B.ReportAllocs()
156 B.ResetTimer()
157 for B.Loop() {
158 r.ServeHTTP(w, req)
159 }
160}

Callers 14

BenchmarkGithubFunction · 0.85
BenchmarkOneRouteFunction · 0.85
BenchmarkManyHandlersFunction · 0.85
Benchmark5ParamsFunction · 0.85
BenchmarkOneRouteJSONFunction · 0.85
BenchmarkOneRouteHTMLFunction · 0.85
BenchmarkOneRouteSetFunction · 0.85
BenchmarkOneRouteStringFunction · 0.85
BenchmarkManyRoutesFirstFunction · 0.85
BenchmarkManyRoutesLastFunction · 0.85

Calls 2

newMockWriterFunction · 0.85
ServeHTTPMethod · 0.45

Tested by

no test coverage detected