22 lines
339 B
Go
Raw Normal View History

2024-03-13 21:33:41 +00:00
package main_test
import (
"testing"
"git.akyoto.dev/go/server"
)
func BenchmarkAkyoto(b *testing.B) {
bench(
b,
2024-03-14 11:55:01 +00:00
func() server.Server {
2024-03-13 21:33:41 +00:00
return server.New()
},
2024-03-14 11:55:01 +00:00
func(s server.Server, method string, path string) {
s.Router().Add(method, path, func(ctx server.Context) error {
2024-03-13 21:33:41 +00:00
return ctx.Bytes(payload)
})
},
)
}