hysryt / wiki

https://hysryt.github.io/wiki/
0 stars 0 forks source link

ab #168

Open hysryt opened 3 years ago

hysryt commented 3 years ago

Webサーバーの性能を測るツール https://httpd.apache.org/docs/2.4/programs/ab.html

Apache Bench の頭文字をとってabコマンド

hysryt commented 3 years ago

オプション

-n : 総リクエスト数 -c : 同時に送るリクエスト数

1000件のリクエストを同時に10件ずつ送るケース(10人のユーザーがそれぞれ100件リクエストを送るイメージ)

$ ab -n 1000 -c 10 <URL>

結果

Time taken for tests : テストにかかった時間 Complete requests : 処理したリクエスト数(失敗したリクエストを含む) Failed requests : 失敗したリクエスト数 Total transferred : サーバーから受信したバイト数 HTML transferred : サーバーから受信したバイト数からHTTPヘッダを除いたバイト数 Requests per second : 一秒あたりの平均リクエスト数(リクエスト数 / 合計時間) Time per request : 1リクエストに費やされる時間( 同時に送るリクエスト数 * かかった時間 / 総リクエスト数 ) Time per request : 1リクエストに費やされる時間( かかった時間 / 総リクエスト数 ) Transfer rate : 転送率(転送量 / かかった時間)

Connection Times

Connect : 接続にかかった時間 Processing : 処理にかかった時間 Waiting : 待ち時間 Total : 合計

Percentage of the requests served within a certain time

一定時間内に提供されたリクエストの割合

Percentage of the requests served within a certain time (ms)
  50%    956
  66%   1785
  75%   1785
  80%   1975
  90%   1975
  95%   1975
  98%   1975
  99%   1975
 100%   1975

上記の場合、956ms内に完了したリクエストが50% 1785ms内に完了したリクエストが75% 1975ms内に完了したリクエストが100%