3 个版本 (破坏性更新)
使用旧的Rust 2015
0.3.0 | 2018年6月1日 |
---|---|
0.2.0 | 2018年4月8日 |
0.1.0 | 2018年2月9日 |
#16 in #status-code
40KB
996 行
RENCH
端点基准工具。用Rust编写... rust + bench = rench
安装
安装需要git或cargo。
从源代码
克隆或分叉仓库并运行以下命令
cargo install -f
从crates
cargo install -f rench
这应该会安装并下载最新版本。
用法
HTTP基准工具的精髓是对端点运行一系列查询并收集其事实。然后,这些事实被总结出来供用户检查。为了真正最大化端点,我们使用简单的线程模型来同时发出许多请求。这允许我们生成大量请求并尝试完全饱和HTTP端点。
您可以更改线程数和请求数以适应您的需求。您甚至可以指定多个URL,它将在它们之间轮询请求。
$ ./target/release/rench -c 4 --engine=hyper -n 10000 http://0.0.0.0:6767
Beginning requests
1000 requests
2000 requests
3000 requests
4000 requests
5000 requests
6000 requests
7000 requests
8000 requests
9000 requests
10000 requests
Finished!
Took 4.813263821 seconds
2077.5923306697964 requests / second
Summary
Average: 1.88827 ms (std: 0.763338 ms)
Median: 1.012478 ms
Longest: 1005.942426 ms
Shortest: 0.403114 ms
Requests: 10000
Data: 234.38 KB
Status codes:
200: 10000
Latency Percentiles (2% of requests per bar):
▌ 7.399224
▌
▌
▌▌
▖▌▌
▖▌▌▌
▖▌▌▌▌
▖▖▖▌▌▌▌▌▌▌
▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▖▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌
▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ 0
Latency Histogram (each bar is 2% of max latency)
▌ 9862
▌
▌
▌
▌
▌
▌
▌
▌
▌▖ 0
选项
$ rench --help
Git Release Names
Kevin Choubacha <chewbacha@gmail.com>
USAGE:
rench [FLAGS] [OPTIONS] <URL>...
FLAGS:
-h, --help Prints help information
-i, --head The issue head requests instead of get
-V, --version Prints version information
OPTIONS:
--chart-size <chart-size> The size of the chart to render [values: none, n, small, s, medium, m, large, l]
-c <concurrency> The number of concurrent requests to make
-e, --engine <engine> The engine to use [values: hyper, reqwest]
-n <requests> The number of requests in total to make
ARGS:
<URL>... Each url specified will be round robined.
依赖关系
~15–24MB
~417K SLoC