工具:Apache的ab.exe和abs.exe
主要参数:-n(总请求数) -c(并发用户数) -C(cookie)
如:
ab -n1000 -c10 -C c1=v1;c2=v2;c3=v3 http://localhost/app/index.html
abs -n1000 -c10 -C c1=v1;c2=v2;c3=v3 https://localhost/app/index.html
执行结果:
Request per second,即吞吐率
Time per request,即平均请求等待时间
Time per request(across all concurrent requests),即平均请求处理时间
=======================================
结论:
使用适当的并发数,提高吞吐率!
当并发过大,吞吐率下降时,则需考虑扩展方案!
转载于:https://my.oschina.net/TOW/blog/597912