24 lines
346 B
Go
Raw Permalink Normal View History

2024-03-13 21:33:41 +00:00
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)
})
},
)
}