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

Function BenchmarkOneRouteSet

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

Source from the content-addressed store, hash-verified

72}
73
74func BenchmarkOneRouteSet(B *testing.B) {
75 router := New()
76 router.GET("/ping", func(c *Context) {
77 c.Set("key", "value")
78 })
79 runRequest(B, router, http.MethodGet, "/ping")
80}
81
82func BenchmarkOneRouteString(B *testing.B) {
83 router := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
runRequestFunction · 0.85
SetMethod · 0.80
GETMethod · 0.65

Tested by

no test coverage detected