(b *testing.B)
| 337 | } |
| 338 | |
| 339 | func BenchmarkRouter_Search_Param(b *testing.B) { |
| 340 | r := newTestRouter() |
| 341 | for i := 0; i < 50; i++ { |
| 342 | insertRoute(r, "GET", fmt.Sprintf("/user/:id/section/%d", i)) |
| 343 | } |
| 344 | b.ResetTimer() |
| 345 | b.ReportAllocs() |
| 346 | for i := 0; i < b.N; i++ { |
| 347 | r.Search("GET", "/user/42/section/25") |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | func BenchmarkServeHTTP_StaticRoute(b *testing.B) { |
| 352 | server := New() |
nothing calls this directly
no test coverage detected