Skip to content

Conversation

@zensh
Copy link
Contributor

@zensh zensh commented Apr 12, 2017

非常感谢你的评测,我发现 Gear 的测试逻辑不对,所以导致很多 bench 图表一枝独秀。

Gear 的 Router 也是一个的 Gear 中间件, 不会默认挂载,这里修复了一下。

目前的 Gear 版本 handle 了 context canceled error, 回头修复。

另外,按照目前的测试逻辑——简单的回写一个 hello,基于原生 http server 的框架区别不会很大,无非就是多了一个初始化逻辑。我本地对比跑了一下 gin 和 gear,gear 稍低一点。因为 Gear 内置的初始化逻辑确实多了一些,包括检测 Compress 组件、recover 异常、初始化 cookie 模块、初始化 context 等

@smallnest smallnest merged commit a7f8b74 into smallnest:master Apr 12, 2017
@kirillDanshin
Copy link
Contributor

sorry, but I can't read your message, because I don't know the language you write in. I've got a look in the code, so: am I got it right, that gear got awesome result in concurrency RPS (see https://github.com/smallnest/go-web-framework-benchmark/blob/cdc66a2cbdc5a8c655eb931f13f7c87db49e1ae4/concurrency.png) because the router was not used and we just benchmarked Go structs, hashmap and net/http's errors?

@zensh
Copy link
Contributor Author

zensh commented Apr 12, 2017

@kirillDanshin Yes, router middleware did not run

@kirillDanshin
Copy link
Contributor

@zensh thanks for explanation and your fix. very interesting to see real results

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

Labels

None yet

3 participants