22 lines
327 B
Go
Raw Normal View History

2024-03-22 14:47:52 +00:00
package main_test
import (
"testing"
"git.akyoto.dev/go/web"
)
func BenchmarkWeb(b *testing.B) {
bench(
b,
func() web.Server {
return web.NewServer()
},
func(s web.Server, method string, path string) {
s.Router().Add(method, path, func(ctx web.Context) error {
return ctx.Bytes(payload)
})
},
)
}