23 lines
394 B
Go
Raw Permalink Normal View History

2024-03-13 22:53:34 +00:00
package main_test
import (
"net/http"
"testing"
"github.com/julienschmidt/httprouter"
)
func BenchmarkJSHR(b *testing.B) {
bench(
b,
func() *httprouter.Router {
return httprouter.New()
},
func(r *httprouter.Router, method string, path string) {
r.Handle(method, path, func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
w.Write(payload)
})
},
)
}