apache bench压测工具POST,GET压测且定义header及json的内容

 

要求时间的单curl测试的方式以下:json

time curl http://xxxxx/hq/restapi/isStart

curl用来用post请求,且有header及请求内容api

time curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: d63xxx-xxxx-xxxxf450" -d '{"lsock":[{"akcolde":"600000","marketType":"BB"}]}' 

"http://xxxxxx/hq/restapi/ime"

用ab来做吧。app

ab -n 100000 -c 500 http://xxx/hq/restapi/isdrt
ab -n 10000 -c 100  -p "post.txt" -T "application/json" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "Postman-Token: d6xxs-sdf-sdf09d" "http://cnxxx81/hq/restapi/queryRealTime"

post.txtcurl

{"lstStock":[{"sterode":"600000","madfpe":"SH"}]}

相关文章
相关标签/搜索