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

24 lines
346 B
Go

package main_test
import (
"testing"
"github.com/gin-gonic/gin"
)
func BenchmarkGin(b *testing.B) {
gin.SetMode(gin.ReleaseMode)
bench(
b,
func() *gin.Engine {
return gin.New()
},
func(g *gin.Engine, method string, path string) {
g.Handle(method, path, func(ctx *gin.Context) {
ctx.Writer.Write(payload)
})
},
)
}