--------------------------------------------------------------------------- Benchmarks ---------------------------------------------------------------------------
(b *testing.B)
| 315 | // --------------------------------------------------------------------------- |
| 316 | |
| 317 | func BenchmarkRouter_Insert(b *testing.B) { |
| 318 | b.ReportAllocs() |
| 319 | for i := 0; i < b.N; i++ { |
| 320 | r := newTestRouter() |
| 321 | for j := 0; j < 100; j++ { |
| 322 | r.Insert("GET", fmt.Sprintf("/route/%d", j), []Handler{func(c *Ctx) error { return nil }}) |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | func BenchmarkRouter_Search_Static(b *testing.B) { |
| 328 | r := newTestRouter() |
nothing calls this directly
no test coverage detected