版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Lg632/article/details/80618144
对于http,https使用apache 的ab
对于http/2使用nghttp2的h2load
压测http
ab -k -t 180 -c 6 -n 1000000 http://172.16.37.66/index.html
h2load -c 6 -T 180 -n 1000000 https://172.16.37.66/index.html
TCP/UDP压测工具 (https://wiki.swoole.com/wiki/page/197.html)
php run.php -c 100 -n 10000 -s tcp://127.0.0.1:9501 -f long_tcp
测试完成后,打印的结果为:
concurrency: 100 //并发数量
request num: 10000 //请求总数
lost num: 0 //失败次数
success num: 10000 //成功次数
total time: 0.157 //总耗时
req per second: 63558 //qps,每秒处理的请求数
one req use(ms): 0.015 //单个请求的平均时长,此结果目前不准确,请勿作为参考