Skip to content
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
base: master
from
Open

Add Iris v1 (nethttp) #57

wants to merge 12 commits into from

Conversation

@ghost
Copy link

ghost commented Mar 22, 2016

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

Makis Maropoulos added 8 commits Mar 22, 2016
Makis Maropoulos
Makis Maropoulos
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
Makis Maropoulos
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!
Makis Maropoulos
Makis Maropoulos
Makis Maropoulos
@CaptainCodeman
Copy link

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
Copy link
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
Copy link

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
Copy link
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.

Makis Maropoulos added 3 commits Mar 26, 2016
Makis Maropoulos
Makis Maropoulos
Makis Maropoulos
@ghost ghost changed the title Add Iris 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.