go test -run=^$ -bench=Benchmark_Router_Handler_StrictRouting -benchmem -count=4
(b *testing.B)
| 1871 | |
| 1872 | // go test -run=^$ -bench=Benchmark_Router_Handler_StrictRouting -benchmem -count=4 |
| 1873 | func Benchmark_Router_Handler_StrictRouting(b *testing.B) { |
| 1874 | app := New() |
| 1875 | app.config.CaseSensitive = true |
| 1876 | registerDummyRoutes(app) |
| 1877 | appHandler := app.Handler() |
| 1878 | |
| 1879 | c := &fasthttp.RequestCtx{} |
| 1880 | |
| 1881 | c.Request.Header.SetMethod("DELETE") |
| 1882 | c.URI().SetPath("/user/keys/1337") |
| 1883 | |
| 1884 | for b.Loop() { |
| 1885 | appHandler(c) |
| 1886 | } |
| 1887 | } |
| 1888 | |
| 1889 | // go test -run=^$ -bench=Benchmark_Router_GitHub_API -benchmem -count=16 |
| 1890 | func Benchmark_Router_GitHub_API(b *testing.B) { |