23 lines
360 B
Go
Raw Normal View History

2024-03-13 22:39:35 +00:00
package main_test
import (
"net/http"
"testing"
"github.com/go-zoo/bone"
)
func BenchmarkBone(b *testing.B) {
bench(
b,
func() *bone.Mux {
return bone.New()
},
func(mux *bone.Mux, method string, path string) {
mux.Register(method, path, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write(payload)
}))
},
)
}