CentOS安装:yum install httpd-tools
Windows安装:https://www.apachelounge.com/download/
查看ab版本:ab -V
查看安装路径:which ab
简单调用:
get请求:ab -n 100 -c 5 http://www.baidu.com/
post请求:ab -n 10000 -c 1000 -p 'post.txt' -T 'application/x-www-form-urlencoded' 'http://www.watergame.orbis.com.cn/api/post_user_award'
请求时忽略错误(-r):ab -n 100 -c -r 5 http://www.baidu.com/
详细介绍: