go test -v -run=^$ -bench=Benchmark_App_RebuildTree -benchmem -count=4
(b *testing.B)
| 1494 | |
| 1495 | // go test -v -run=^$ -bench=Benchmark_App_RebuildTree -benchmem -count=4 |
| 1496 | func 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 |
| 1510 | func Benchmark_App_MethodNotAllowed(b *testing.B) { |
nothing calls this directly
no test coverage detected