# 安装工具包的时候差不多有 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 30s test @ http://www.baidu.com
5 threads and 5 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 44.59ms 17.41ms 331.91ms 95.66%
Req/Sec 23.11 5.77 30.00 57.04%
3439 requests in 30.03s, 50.47MB read
Socket errors: connect 0, read 10, write 0, timeout 0
Requests/sec: 114.52
Transfer/sec: 1.68MB
wrk.method = "POST"
wrk.body = "hms_user_id=222222&routing_key=ad.sys_user.add"
wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"