AB测压工具
ab-web service压力测试工具
ab [option][http[s]]://hostname[:port]/path
请求数:-n requests
并发数: -c concurrency
长连接: -k
[[email protected] html]# ab -n 1000 -c 10 https://10.1.45.70/index.txt
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.1.45.70 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: Apache/2.4.6
Server Hostname: 10.1.45.70
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Document Path: /index.txt
Document Length: 595 bytes 单次请求大小
Concurrency Level: 10
Time taken for tests: 21.388 seconds总时长
Complete requests: 1000请求数
Failed requests: 0
Write errors: 0失败次数
Total transferred: 878000 bytes总传输字节数
HTML transferred: 595000 bytes html文档大小
Requests per second: 46.75 [#/sec] (mean)每秒完成的请求数
Time per request: 213.885 [ms] (mean)每10个为一批,需要多长时间
Time per request: 21.388 [ms] (mean, across all concurrent
requests)
Transfer rate: 40.09 [Kbytes/sec] received 传输速度
Connection Times (ms)
最小值min (平均值)mean[+/-sd] median(中间值) max最大值
min mean[+/-sd] median max
Connect: 连接建立 33 150 39.6 155 298
Processing: 服务处理请求 1 63 46.6 46 190
Waiting: 服务端响应请求 0 37 25.1 27 176
Total: 连接总共花费时间 34 213 48.8 206 381
Percentage of the requests served within a certain time (ms)
50% 206
66% 213
75% 218
80% 224
90% 297
95% 325
98% 341
99% 351
100% 381 (longest request)