23 lines
348 B
Go
Raw Permalink Normal View History

2024-03-13 21:33:41 +00:00
package main_test
import (
"net/http"
"testing"
"github.com/go-chi/chi/v5"
)
func BenchmarkChi(b *testing.B) {
bench(
b,
func() *chi.Mux {
return chi.NewRouter()
},
func(mux *chi.Mux, method string, path string) {
mux.MethodFunc(method, path, func(w http.ResponseWriter, r *http.Request) {
w.Write(payload)
})
},
)
}