-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Iris v1 (nethttp) #57
base: master
Are you sure you want to change the base?
Conversation
vgocoder 10:21 I follow the README.md ,but error. go get -u github.com/kataras/go-http-routing-benchmark github.com/kataras/go-http-routing-benchmark ./routers.go:339: c.Response undefined (type echo.Context is pointer to interface, not interface) ./routers.go:339: c.Param undefined (type echo.Context is pointer to interface, not interface) ./routers.go:344: c.Response undefined (type echo.Context is pointer to interface, not interface) ./routers.go:344: c.Request undefined (type echo.Context is pointer to interface, not interface) ./routers.go:358: cannot use h (type interface {}) as type echo.Handler in argument to e.Get: interface {} does not implement echo.Handler (missing Handle method) ./routers.go:360: cannot use h (type interface {}) as type echo.Handler in argument to e.Post: interface {} does not implement echo.Handler (missing Handle method) ./routers.go:362: cannot use h (type interface {}) as type echo.Handler in argument to e.Put: interface {} does not implement echo.Handler (missing Handle method) ./routers.go:364: cannot use h (type interface {}) as type echo.Handler in argument to e.Patch: interface {} does not implement echo.Handler (missing Handle method) ./routers.go:366: cannot use h (type interface {}) as type echo.Handler in argument to e.Delete: interface {} does not implement echo.Handler (missing Handle method) ./routers.go:371: cannot use e (type echo.Echo) as type http.Handler in return argument: echo.Echo does not implement http.Handler (wrong type for ServeHTTP method) have ServeHTTP(engine.Request, engine.Response) want ServeHTTP(http.ResponseWriter, *http.Request) ./routers.go:371: too many errors @kataras Can U help me ? vgocoder 11:54 I just replace "github.com/labstack/echo" with "gopkg.in/labstack/echo.v1” in file “routers.go” line 36 and “go get gopkg.in/gopkg.in/labstack/echo.v1” It works
I added this way because you had conficts with the master branch, but no problem we will transfer this to the iris repository when I will wake up, thanks for the commit!
This makes it easier to compare performance but you are still using the caching middleware for your router which is not realistic. I don't understand why you feel the need to do this - your router has good performance. This is meant to be a router benchmark, not a map / cache benchmark. If we wrap all the routers with the same cache middleware they'd pretty much all then produce identical results.
|
EDIT(2016-10-17): Removed an now obsolete comment about LARS If you find any other framework doing stuff like that, please let me know. |
👍 I was going to suggest possibly varying the input parameters to make any cache explode but it shouldn't be necessary as long as the tests are policed to ensure they are fair and comparable. |
I'm very open to such suggestions. Please open a separate issue for them. The usage of sync.Pool is also rather questionable. Basically all of the frameworks achieving "0 B" in all tests (actually they're not - it's just caching and amortization) use it. However, in the real world this pool is likely flushed by the GC. |
This is an old PR, not compatible any more, sorry for the noise.