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

Open
wants to merge 12 commits into
from

Conversation

Projects
None yet
3 participants
@ghost

ghost commented Mar 22, 2016

This is an old PR, not compatible any more, sorry for the noise.

kataras added some commits Mar 22, 2016

Fix echo import by a request
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
Add new results - commit by @vgocoder
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!

@appleboy appleboy referenced this pull request Mar 25, 2016

Closed

Iris is faster #560

@CaptainCodeman

This comment has been minimized.

Show comment
Hide comment
@CaptainCodeman

CaptainCodeman Mar 25, 2016

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.

iris.New() should be replaced with iris.Custom(iris.StationOptions{Cache: false}) so people can make true and valid like-for-like comparisons.

CaptainCodeman commented Mar 25, 2016

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.

iris.New() should be replaced with iris.Custom(iris.StationOptions{Cache: false}) so people can make true and valid like-for-like comparisons.

@julienschmidt

This comment has been minimized.

Show comment
Hide comment
@julienschmidt

julienschmidt Mar 25, 2016

Owner

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 will certainly not accept iris for the benchmarks like this.

Owner

julienschmidt commented Mar 25, 2016

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 will certainly not accept iris for the benchmarks like this.

@CaptainCodeman

This comment has been minimized.

Show comment
Hide comment
@CaptainCodeman

CaptainCodeman Mar 25, 2016

👍

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.

CaptainCodeman commented Mar 25, 2016

👍

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.

@julienschmidt

This comment has been minimized.

Show comment
Hide comment
@julienschmidt

julienschmidt Mar 25, 2016

Owner

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.

Owner

julienschmidt commented Mar 25, 2016

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.

@ghost ghost changed the title from Add Iris to Add Iris v1 (nethttp) Oct 17, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment