Open astaxie opened 10 years ago
The code was checked out automatically with go get
yesterday. Do you have a go1
tag set?
I have no go1
tag. I think maybe I use the develop branch. So in the beego new version the router has changed a lot. I will release later. and will send you a pull request. and then please update your test case again. Thanks for your test case code. It's really useful for me to profile my programe.
The benchmark was run with https://github.com/astaxie/beego/commit/3e4c01598298f31f62441af9b6a1fb520e4ec285.
The results also depend on the go version and the hardware of course. Some results seem suspicious slow in the logs in the first post.
Unless the API of beego changes, I don't need a PR. I will not merge results from other persons. Just notify me and I'll run the benchmark again.
- app := beego.NewApp()
+ app := beego.NewControllerRegister()
-const fiveBeego = "/:a!/:b!/:c!/:d!/:e!"
+const fiveBeego = "/:a/:b/:c/:d/:e"
- router := loadBeegoSingle("GET", "/user/:name!", beegoHandler)
+ router := loadBeegoSingle("GET", "/user/:name", beegoHandler)
-const twentyBeego = "/:a!/:b!/:c!/:d!/:e!/:f!/:g!/:h!/:i!/:j!/:k!/:l!/:m!/:n!/:o!/:p!/:q!/:r!/:s!/:t!"
+const twentyBeego = "/:a/:b/:c/:d/:e/:f/:g/:h/:i/:j/:k/:l/:m/:n/:o/:p/:q/:r/:s/:t"
like this modify. should I send the pull request?
You could remove the fiveBeego
and twentyBeego
constants and then and use fiveColon
/ twentyColon
instead.
But this makes beego also accept for example GET /user/
for the handle beegoHandle, right?
This is not really intended. Is it significantly faster?
in the new version, it's will not accept GET /user/
. In fact it act as GocraftWeb. when I release I will send you pull request. actually in the new version if you want to accept should use /?:id
can you retest for the new code?
I will definitely do a re-run soon (also including Gin as a new framework), but I currently don't have time for it. Please have patience.
Looking forward to the new result. And also add revel test if can
Just wondering, is this repository going to get updates after a number of frameworks had new releases?
Yes, round 2 is scheduled for august.
great. thanks for the quick response :+1:
Hi! Maybe you could add Falcore, I've seen it on the latest TechEmpower benchmark (http://www.techempower.com/benchmarks/#section=data-r9): https://github.com/fitstar/falcore
First results are in. I can confirm that Beego improved a lot :+1: Final results will be released in 1-2 days.
Falcore is not suitable for a benchmark like this. I doubt at all, that it is suitable for any application with more than 2-3 handler functions. Or maybe I did not understand the concept. Pull requests welcome in that case :smiley:
:+1:
hi @julienschmidt. when will the final results released?
Sorry for the delay. I found a few smaller problems, which should be addressed. Unfortunately I got very busy then. The final results will be released within the next few days.
Bad news everyone! The 2nd round was planned since a long time, but so far I was unable to do it. The main reason is that I am currently about 10200 km away from my benchmark system. The usual SSH login didn't work and today I sent someone to take a look. It seems like there is a hardware defect :worried:
I will now search for another suitable system (I want a completely idle, freshly set-up system with suitable hardware, e.g. no notebook CPUs).
I went ahead and ran a bench on my very not sterile macbook air, all while running Safari and stuff. Still some data is better then none, and it does shows gross estimates (enough for me, at least for now). In case anyone is interested, it gist is here https://gist.github.com/maximveksler/f336875ed081e4b4cc46
I did some manual fixing of indentation there, to make the output more readable. FYI.
Another run on my MacBook Air https://gist.github.com/ant0ine/3caede217dda281dcedb It would be cool the update the README, things have changed since last June.
golang/go@52c84c34fdb7c28d8f5c32458bad84b096af2797 (v1.5) bench on my iMac11 go test -bench=. -timeout=20m
https://gist.github.com/denji/ace53cc308557422ecfa
go test -bench=. -timeout=180m -benchtime 10s
Intel Xeon E3-1230v3 (4x 3.30GHz + Turbo Boost 2.0 up to 3.7GHz) 2x 8GiB DDR3-1600 RAM, dual-channel, ECC go version go1.4.2 freebsd/amd64 FreeBSD 10.1-RELEASE-p5, clean installation
hi, @julienschmidt
I have test you code in my local. the bench is much better.
later I will send you a pull request. thanks!
and the follow is the result: