https://github.com/markthree/http-bench
测试 deno, node 和 go 相关框架的性能
https://github.com/markthree/http-bench
bench deno go http node
Last synced: about 2 months ago
JSON representation
测试 deno, node 和 go 相关框架的性能
- Host: GitHub
- URL: https://github.com/markthree/http-bench
- Owner: markthree
- License: mit
- Created: 2023-02-19T08:48:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-19T08:51:27.000Z (about 3 years ago)
- Last Synced: 2025-01-13T05:08:15.363Z (about 1 year ago)
- Topics: bench, deno, go, http, node
- Language: TypeScript
- Homepage:
- Size: 315 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# http-bench
测试 `deno`, `node` 和 `go` 相关框架的性能
## 标准
压测由 [plow](https://github.com/six-ddc/plow) 提供支持
```shell
plow http://127.0.0.1:3000/ -c 200 -n 100000
```
- 同时刻下 200 个连接
- 共计 100000 个请求
## 结果
| 框架 | 最小延迟 | 平均延迟 | 最大延迟 |
| ----- | -------- | -------- | -------- |
| deno | 1.968 | 7.63 | 27.614 |
| node | 0 | 8.912 | 60.042 |
| hono | 0.515 | 7.208 | 25.578 |
| gin | 0 | 2.22 | 41.269 |
| koa | 0 | 11.941 | 70.326 |
| nitro | 2.101 | 13.321 | 60.149 |
平均延迟下,[gin](https://github.com/gin-gonic/gin) 的性能最好。
而原生 [deno](https://github.com/denoland/deno) 和 [hono](https://github.com/honojs/hono) 对最大延迟控制得最好。

## License
Made with [markthree](https://github.com/markthree)
Published under [MIT License](./LICENSE).