Home / Function/ Benchmark_Router_NotFound() — fiber Function Reference

Benchmark_Router_NotFound() — fiber Function Reference

Architecture documentation for the Benchmark_Router_NotFound() function in router_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  5c48c8c4_0d8f_927d_b5a4_e4de054361f2["Benchmark_Router_NotFound()"]
  326d7e00_9e4f_d854_0c78_b9c0c93e5537["router_test.go"]
  5c48c8c4_0d8f_927d_b5a4_e4de054361f2 -->|defined in| 326d7e00_9e4f_d854_0c78_b9c0c93e5537
  96c0a661_d778_b8e3_0e6d_27128de9df0a["registerDummyRoutes()"]
  5c48c8c4_0d8f_927d_b5a4_e4de054361f2 -->|calls| 96c0a661_d778_b8e3_0e6d_27128de9df0a
  style 5c48c8c4_0d8f_927d_b5a4_e4de054361f2 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

router_test.go lines 1531–1549

func Benchmark_Router_NotFound(b *testing.B) {
	b.ReportAllocs()
	app := New()
	app.Use(func(c Ctx) error {
		return c.Next()
	})
	registerDummyRoutes(app)
	appHandler := app.Handler()
	c := &fasthttp.RequestCtx{}

	c.Request.Header.SetMethod("DELETE")
	c.URI().SetPath("/this/route/does/not/exist")

	for b.Loop() {
		appHandler(c)
	}
	require.Equal(b, 404, c.Response.StatusCode())
	require.Equal(b, "Not Found", string(c.Response.Body()))
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does Benchmark_Router_NotFound() do?
Benchmark_Router_NotFound() is a function in the fiber codebase, defined in router_test.go.
Where is Benchmark_Router_NotFound() defined?
Benchmark_Router_NotFound() is defined in router_test.go at line 1531.
What does Benchmark_Router_NotFound() call?
Benchmark_Router_NotFound() calls 1 function(s): registerDummyRoutes.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free