Benchmark_Redirect_Route() — fiber Function Reference
Architecture documentation for the Benchmark_Redirect_Route() function in redirect_test.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 7d6f4708_6e6f_f8ee_817f_da2063e7fdb0["Benchmark_Redirect_Route()"] fee77792_8d65_0d02_107f_9a956c66b44c["redirect_test.go"] 7d6f4708_6e6f_f8ee_817f_da2063e7fdb0 -->|defined in| fee77792_8d65_0d02_107f_9a956c66b44c style 7d6f4708_6e6f_f8ee_817f_da2063e7fdb0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
redirect_test.go lines 707–730
func Benchmark_Redirect_Route(b *testing.B) {
app := New()
app.Get("/user/:name", func(c Ctx) error {
return c.JSON(c.Params("name"))
}).Name("user")
c := app.AcquireCtx(&fasthttp.RequestCtx{}).(*DefaultCtx) //nolint:errcheck,forcetypeassert // not needed
b.ReportAllocs()
var err error
for b.Loop() {
err = c.Redirect().Route("user", RedirectConfig{
Params: Map{
"name": "fiber",
},
})
}
require.NoError(b, err)
require.Equal(b, StatusSeeOther, c.Response().StatusCode())
require.Equal(b, "/user/fiber", string(c.Response().Header.Peek(HeaderLocation)))
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does Benchmark_Redirect_Route() do?
Benchmark_Redirect_Route() is a function in the fiber codebase, defined in redirect_test.go.
Where is Benchmark_Redirect_Route() defined?
Benchmark_Redirect_Route() is defined in redirect_test.go at line 707.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free