Wrk 安装

1
2
3
4
5
6
7
$ yum -y install git openssl-devel
$ git clone https://github.com/wg/wrk.git
# 国内网络不好可以换成
# $ git clone https://github.com.cnpmjs.org/wg/wrk.git
# $ yum -y install wget unzip && wget https://cdn.hongfs.cn/software/wrk/wrk-master.zip && unzip wrk-master.zip && rm -rf wrk-master.zip && cp -r wrk-master/ wrk && rm -rf wrk-master
$ cd wrk
$ make

测试

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ ./wrk -t8 -c200 -d30s --latency https://www.hongfs.cn
Running 30s test @ https://www.hongfs.cn
8 threads and 200 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 38.21ms 23.52ms 1.20s 95.03%
Req/Sec 673.36 144.80 0.90k 83.26%
Latency Distribution
50% 33.52ms
75% 36.40ms
90% 47.53ms
99% 107.63ms
158344 requests in 30.11s, 88.80MB read
Requests/sec: 5258.60
Transfer/sec: 2.95MB
往上