Benchmark_App_MethodNotAllowed_Parallel() — fiber Function Reference
Architecture documentation for the Benchmark_App_MethodNotAllowed_Parallel() function in router_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 091f5bcf_a7c8_e5f5_3b23_8c67d66f0154["Benchmark_App_MethodNotAllowed_Parallel()"] 326d7e00_9e4f_d854_0c78_b9c0c93e5537["router_test.go"] 091f5bcf_a7c8_e5f5_3b23_8c67d66f0154 -->|defined in| 326d7e00_9e4f_d854_0c78_b9c0c93e5537 style 091f5bcf_a7c8_e5f5_3b23_8c67d66f0154 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
router_test.go lines 2058–2084
func Benchmark_App_MethodNotAllowed_Parallel(b *testing.B) {
app := New()
h := func(c Ctx) error {
return c.SendString("Hello World!")
}
app.All("/this/is/a/", h)
app.Get("/this/is/a/dummy/route/oke", h)
appHandler := app.Handler()
b.RunParallel(func(pb *testing.PB) {
// Each worker gets its own RequestCtx to avoid data races
c := &fasthttp.RequestCtx{}
c.Request.Header.SetMethod("DELETE")
c.URI().SetPath("/this/is/a/dummy/route/oke")
for pb.Next() {
appHandler(c)
}
})
// Single-threaded verification on a fresh context to preserve correctness checks
verifyCtx := &fasthttp.RequestCtx{}
verifyCtx.Request.Header.SetMethod("DELETE")
verifyCtx.URI().SetPath("/this/is/a/dummy/route/oke")
appHandler(verifyCtx)
require.Equal(b, 405, verifyCtx.Response.StatusCode())
require.Equal(b, MethodGet+", "+MethodHead, string(verifyCtx.Response.Header.Peek("Allow")))
require.Equal(b, utils.StatusMessage(StatusMethodNotAllowed), string(verifyCtx.Response.Body()))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_App_MethodNotAllowed_Parallel() do?
Benchmark_App_MethodNotAllowed_Parallel() is a function in the fiber codebase, defined in router_test.go.
Where is Benchmark_App_MethodNotAllowed_Parallel() defined?
Benchmark_App_MethodNotAllowed_Parallel() is defined in router_test.go at line 2058.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free