rewrk
? Version 0.3.2
より近代的なHTTPフレームワークベンチマークユーティリティ。
F:rewrk> rewrk -h http://127.0.0.1:5000 -t 12 -c 60 -d 5s
Benchmarking 60 connections @ http://127.0.0.1:5000 for 5 seconds
Latencies:
Avg Stdev Min Max
3.27ms 0.40ms 1.95ms 9.39ms
Requests:
Total: 91281 Req/Sec: 18227.81
Transfer:
Total: 1.13 MB Transfer Rate: 231.41 KB/Sec
オプションで-PCTフラグ
+ --------------- + --------------- +
| Percentile | Avg Latency |
+ --------------- + --------------- +
| 99.9% | 6.88ms |
| 99% | 5.62ms |
| 95% | 4.62ms |
| 90% | 4.24ms |
| 75% | 3.78ms |
| 50% | 3.49ms |
+ --------------- + --------------- +
このプロジェクトの背後にある動機は、WRKと呼ばれるベンチマークツールを使用するTechmpowerなどのベンチマークでの開発者トンネルビジョンから拡張されています。
問題は、WRKがHTTP仕様の一部のみを処理し、ほとんどの最新のブラウザーやクライアントではもはや有効になっていないHTTP/1パイプラインを使用できるフレームワークとサーバーに完全に偏っていることです。
これがREWRKが登場する場所です。このベンチマークは、HyperのクライアントAPIの上に構築されており、多くの利点とより現実的なベンチマーク方法をもたらします。
CLIを使用して単純に実行されるバイナリをコンパイルしている場合、使用法は比較的簡単です。
次のベンチマークを作成する例は次のとおりです。
-c 256 )--http2 )-t 12 )-d 15s )--pct )http://127.0.0.1:5000 -h http://127.0.0.1:5000 5000) CLIコマンド:
rewrk -c 256 -t 12 -d 15s -h http://127.0.0.1:5000 --http2 --pct
ヘルプメニューを紹介するには、単にrewrk --help実行します。
USAGE:
rewrk.exe [FLAGS] [OPTIONS] --duration <duration> --host <host>
FLAGS:
--help Prints help information
--http2 Set the client to use http2 only. (default is http/1) e.g. '--http2'
--pct Displays the percentile table after benchmarking.
-V, --version Prints version information
OPTIONS:
-c, --connections <connections> Set the amount of concurrent e.g. '-c 512' [default: 1]
-d, --duration <duration> Set the duration of the benchmark.
-h, --host <host> Set the host to bench e.g. '-h http://127.0.0.1:5050'
-t, --threads <threads> Set the amount of threads to use e.g. '-t 12' [default: 1]
ソースからの構築は非常にシンプルです。開始する前に、錆の安定したバージョンがインストールされていることを確認してください。
貨物設置付き
cargo install rewrk --git https://github.com/ChillFish8/rewrk.gitを実行します貨物が走ります
cargo run --release -- <enter flags here>貨物ビルド付き
cargo build --release