2024-03-13 22:33:41 +01:00

23 lines
348 B
Go

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)
})
},
)
}