MCPcopy Index your code
hub / github.com/labstack/echo / benchServe

Function benchServe

perf_bench_test.go:26–35  ·  view source on GitHub ↗
(b *testing.B, e *Echo, req *http.Request)

Source from the content-addressed store, hash-verified

24func (w *nopResponseWriter) WriteHeader(int) {}
25
26func benchServe(b *testing.B, e *Echo, req *http.Request) {
27 b.Helper()
28 w := &nopResponseWriter{}
29 b.ReportAllocs()
30 b.ResetTimer()
31 for i := 0; i < b.N; i++ {
32 w.h = nil
33 e.ServeHTTP(w, req)
34 }
35}
36
37func BenchmarkServeHTTP_Static(b *testing.B) {
38 e := New()

Callers 6

BenchmarkServeHTTP_ParamFunction · 0.85
BenchmarkServeHTTP_JSONFunction · 0.85
BenchmarkServeHTTP_StoreFunction · 0.85

Calls 1

ServeHTTPMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…