23 lines
346 B
Go
23 lines
346 B
Go
package main_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
func BenchmarkEcho(b *testing.B) {
|
|
bench(
|
|
b,
|
|
func() *echo.Echo {
|
|
return echo.New()
|
|
},
|
|
func(e *echo.Echo, method string, path string) {
|
|
e.Add(method, path, func(c echo.Context) error {
|
|
_, err := c.Response().Write(payload)
|
|
return err
|
|
})
|
|
},
|
|
)
|
|
}
|