MCPcopy
hub / github.com/gofiber/fiber / Benchmark_Router_Handler_Strict_Case

Function Benchmark_Router_Handler_Strict_Case

router_test.go:1568–1584  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1566}
1567
1568func Benchmark_Router_Handler_Strict_Case(b *testing.B) {
1569 app := New(Config{
1570 StrictRouting: true,
1571 CaseSensitive: true,
1572 })
1573 registerDummyRoutes(app)
1574 appHandler := app.Handler()
1575
1576 c := &fasthttp.RequestCtx{}
1577
1578 c.Request.Header.SetMethod("DELETE")
1579 c.URI().SetPath("/user/keys/1337")
1580
1581 for b.Loop() {
1582 appHandler(c)
1583 }
1584}
1585
1586// go test -v ./... -run=^$ -bench=Benchmark_Router_Chain -benchmem -count=4
1587func Benchmark_Router_Chain(b *testing.B) {

Callers

nothing calls this directly

Calls 6

registerDummyRoutesFunction · 0.85
HandlerMethod · 0.80
SetMethodMethod · 0.80
SetPathMethod · 0.80
URIMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected