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

Function BenchmarkLoggerMiddleware

benchmarks_test.go:27–32  ·  view source on GitHub ↗
(B *testing.B)

Source from the content-addressed store, hash-verified

25}
26
27func BenchmarkLoggerMiddleware(B *testing.B) {
28 router := New()
29 router.Use(LoggerWithWriter(newMockWriter()))
30 router.GET("/", func(c *Context) {})
31 runRequest(B, router, http.MethodGet, "/")
32}
33
34func BenchmarkManyHandlers(B *testing.B) {
35 router := New()

Callers

nothing calls this directly

Calls 6

NewFunction · 0.85
LoggerWithWriterFunction · 0.85
newMockWriterFunction · 0.85
runRequestFunction · 0.85
UseMethod · 0.65
GETMethod · 0.65

Tested by

no test coverage detected