下载安装:
git clone https://github.com/wg/wrk.git
cd 进入wrk目录 make
常用命令:
wrk -t12 -c100 -d30s –script=post.lua –latency http://www.baidu.com
-t 线程数
-c 连接数
-d 时间
–script 脚本 post方法需要写lua脚本
–latency 响应时间的分布情况
post.lua
wrk.method = "POST"
wrk.body = "param1=value1¶m2=value2"