# 安装工具包的时候差不多有 90 个左右的子工具
sudo yum groupinstall 'Development Tools'
sudo yum install -y openssl-devel git
git clone --depth=1 https://github.com/wg/wrk.git wrk
cd wrk
make
# move the executable to somewhere in your PATH
sudo cp wrk /usr/local/bin
Running 15s test @ http://www.baidu.com
10 threads and 100 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 208.39ms 324.00ms 1.91s 87.70%
Req/Sec 82.68 64.81 414.00 70.60%
11345 requests in 15.02s, 166.51MB read
Socket errors: connect 0, read 20, write 0, timeout 59
Requests/sec: 755.26
Transfer/sec: 11.08MB
wrk.method = "POST"
wrk.body = "hms_user_id=222222&routing_key=ad.sys_user.add"
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"