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

Function BenchmarkManyHandlers

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

Source from the content-addressed store, hash-verified

32}
33
34func BenchmarkManyHandlers(B *testing.B) {
35 router := New()
36 router.Use(Recovery(), LoggerWithWriter(newMockWriter()))
37 router.Use(func(c *Context) {})
38 router.Use(func(c *Context) {})
39 router.GET("/ping", func(c *Context) {})
40 runRequest(B, router, http.MethodGet, "/ping")
41}
42
43func Benchmark5Params(B *testing.B) {
44 DefaultWriter = os.Stdout

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected