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

Function Benchmark404Many

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

Source from the content-addressed store, hash-verified

107}
108
109func Benchmark404Many(B *testing.B) {
110 router := New()
111 router.GET("/", func(c *Context) {})
112 router.GET("/path/to/something", func(c *Context) {})
113 router.GET("/post/:id", func(c *Context) {})
114 router.GET("/view/:id", func(c *Context) {})
115 router.GET("/favicon.ico", func(c *Context) {})
116 router.GET("/robots.txt", func(c *Context) {})
117 router.GET("/delete/:id", func(c *Context) {})
118 router.GET("/user/:id/:mode", func(c *Context) {})
119
120 router.NoRoute(func(c *Context) {})
121 runRequest(B, router, http.MethodGet, "/viewfake")
122}
123
124type mockWriter struct {
125 headers http.Header

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
runRequestFunction · 0.85
NoRouteMethod · 0.80
GETMethod · 0.65

Tested by

no test coverage detected