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) }) }, ) }