| 1566 | } |
| 1567 | |
| 1568 | func Benchmark_Router_Handler_Strict_Case(b *testing.B) { |
| 1569 | app := New(Config{ |
| 1570 | StrictRouting: true, |
| 1571 | CaseSensitive: true, |
| 1572 | }) |
| 1573 | registerDummyRoutes(app) |
| 1574 | appHandler := app.Handler() |
| 1575 | |
| 1576 | c := &fasthttp.RequestCtx{} |
| 1577 | |
| 1578 | c.Request.Header.SetMethod("DELETE") |
| 1579 | c.URI().SetPath("/user/keys/1337") |
| 1580 | |
| 1581 | for b.Loop() { |
| 1582 | appHandler(c) |
| 1583 | } |
| 1584 | } |
| 1585 | |
| 1586 | // go test -v ./... -run=^$ -bench=Benchmark_Router_Chain -benchmem -count=4 |
| 1587 | func Benchmark_Router_Chain(b *testing.B) { |