https://github.com/caixw/go-http-routers-testing
Go 路由功能测试工具
https://github.com/caixw/go-http-routers-testing
bench benchmark go golang route router test testing
Last synced: 6 months ago
JSON representation
Go 路由功能测试工具
- Host: GitHub
- URL: https://github.com/caixw/go-http-routers-testing
- Owner: caixw
- License: mit
- Created: 2017-05-25T16:11:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-05T01:24:41.000Z (over 2 years ago)
- Last Synced: 2024-06-20T15:40:52.471Z (almost 2 years ago)
- Topics: bench, benchmark, go, golang, route, router, test, testing
- Language: Go
- Homepage: https://caixw.github.io/go-http-routers-testing/
- Size: 207 KB
- Stars: 4
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-http-routers-testing
Go 路由的性能测试工具
## 安装
```shell
go get github.com/caixw/go-http-routers-testing
```
### 运行测试
main.go 可以有以下参数:
- test.benchtime 指定每个测试的运行时间;
```shell
go run json.go -test.benchtime=5s
```
之后通过以下代码编译成 html:
```shell
go run html.go
```
如果要本地查看数据,请运行:
```shell
go run ./serve.go
```
## 协作
与 api 定义有的内容定义在 apis 目录下,如果不同的风格需求可以在此目录下添加即可;
路由定义在 routers 目录下,新路由只需要在此目录下定义 Load 方法即可;
不要提交 /docs/data 下的数据,该数据由本人统一产生。
## 版权
本项目采用 [MIT](https://opensource.org/licenses/MIT) 开源授权许可证,完整的授权说明可在 [LICENSE](LICENSE) 文件中找到。