ベンチマークツールのwrkをインストールしました。
Macでは、brewパッケージで簡単に導入できます。
$ brew install wrk
Linuxでは、パッケージが用意されていないので、githubのリポジトリを利用してインストールします。
$ cd /tmp $ git clone https://github.com/wg/wrk.git $ cd wrk/ $ make $ sudo cp wrk /usr/local/bin/.
使い方
$ wrk -t スレッド数 -c 接続数 <url>
Usage: wrk <options> <url>
Options:
-c, --connections <N> Connections to keep open
-d, --duration <T> Duration of test
-t, --threads <N> Number of threads to use
-s, --script <S> Load Lua script file
-H, --header <H> Add header to request
--latency Print latency statistics
--timeout <T> Socket/request timeout
-v, --version Print version details
Numeric arguments may include a SI unit (1k, 1M, 1G)
Time arguments may include a time unit (2s, 2m, 2h)