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

Function Benchmark_Router_Handler_Unescape_Parallel

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

Source from the content-addressed store, hash-verified

2340}
2341
2342func Benchmark_Router_Handler_Unescape_Parallel(b *testing.B) {
2343 app := New()
2344 app.config.UnescapePath = true
2345 registerDummyRoutes(app)
2346 app.Delete("/créer", func(_ Ctx) error {
2347 return nil
2348 })
2349 appHandler := app.Handler()
2350 c := &fasthttp.RequestCtx{}
2351 c.Request.Header.SetMethod(MethodDelete)
2352 c.URI().SetPath("/cr%C3%A9er")
2353 b.RunParallel(func(pb *testing.PB) {
2354 for pb.Next() {
2355 c.URI().SetPath("/cr%C3%A9er")
2356 appHandler(c)
2357 }
2358 })
2359}
2360
2361func Benchmark_Router_Handler_StrictRouting_Parallel(b *testing.B) {
2362 app := New()

Callers

nothing calls this directly

Calls 8

registerDummyRoutesFunction · 0.85
HandlerMethod · 0.80
SetMethodMethod · 0.80
SetPathMethod · 0.80
URIMethod · 0.80
NewFunction · 0.70
DeleteMethod · 0.65
NextMethod · 0.65

Tested by

no test coverage detected