Add Iris v1 (nethttp) #57

Open
wants to merge 12 commits into
from

Projects

None yet

3 participants

@kataras
kataras commented Mar 22, 2016 edited

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

kataras added some commits Mar 22, 2016
@kataras kataras Add Iris to all benchmarks 64ce220
@kataras kataras 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
e0c5f53
@kataras kataras 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!
865bde4
@kataras kataras Update the results - split the tests- add images also - Iris is the f…
…aster as I knew
ecb38c5
@kataras kataras fix link on readme 2e7b168
@kataras kataras remove ** on ``` doesn't render c288679
@kataras kataras Remove benchmarks mini from previous benchmark run 052a355
@kataras kataras fix formatting of the standalone test md files 18e87e3
@appleboy appleboy referenced this pull request in gin-gonic/gin Mar 25, 2016
Closed

Iris is faster #560

@CaptainCodeman

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
Owner
julienschmidt commented Mar 25, 2016 edited

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

👍

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

@kataras kataras 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