fixed gear’s bench #33
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
非常感谢你的评测,我发现 Gear 的测试逻辑不对,所以导致很多 bench 图表一枝独秀。
Gear 的 Router 也是一个的 Gear 中间件, 不会默认挂载,这里修复了一下。
目前的 Gear 版本 handle 了
context cancelederror, 回头修复。另外,按照目前的测试逻辑——简单的回写一个
hello,基于原生 http server 的框架区别不会很大,无非就是多了一个初始化逻辑。我本地对比跑了一下 gin 和 gear,gear 稍低一点。因为 Gear 内置的初始化逻辑确实多了一些,包括检测 Compress 组件、recover 异常、初始化 cookie 模块、初始化 context 等