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

Function Benchmark_App_RebuildTree

router_test.go:1496–1507  ·  view source on GitHub ↗

go test -v -run=^$ -bench=Benchmark_App_RebuildTree -benchmem -count=4

(b *testing.B)

Source from the content-addressed store, hash-verified

1494
1495// go test -v -run=^$ -bench=Benchmark_App_RebuildTree -benchmem -count=4
1496func Benchmark_App_RebuildTree(b *testing.B) {
1497 app := New()
1498 registerDummyRoutes(app)
1499
1500 b.ReportAllocs()
1501 b.ResetTimer()
1502
1503 for b.Loop() {
1504 app.hasRoutesRefreshed = true
1505 app.RebuildTree()
1506 }
1507}
1508
1509// go test -v -run=^$ -bench=Benchmark_App_MethodNotAllowed -benchmem -count=4
1510func Benchmark_App_MethodNotAllowed(b *testing.B) {

Callers

nothing calls this directly

Calls 3

registerDummyRoutesFunction · 0.85
RebuildTreeMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected