性能测试工具:AB

时间:2023-03-09 00:42:35
性能测试工具:AB
##################################################################################
#格式:ab -n 请求次数 -c 并发请求次数 测试网页
ab -n 100 -c 10 http://localhost/index.php //对指定网站执行400次请求,其中并发次数100次
################################################################################## Server Software: Apache/2.4.9
Server Hostname: localhost
Server Port: 80 Document Path: /index.php
Document Length: 5382 bytes Concurrency Level: 10
#整个测试持续的时间
Time taken for tests: 0.718 second
#完成的请求数量
Complete requests: 100
#失败的请求数量
Failed requests: 0
#整个场景中的网络传输量
Total transferred: 557100 bytes
#整个场景中的HTML内容传输量
HTML transferred: 538200 bytes
#【重要指标】每秒事务数 ,后面括号中的 mean 表示这是一个平均值
Requests per second: 139.35 [#/se] (mean)
#【重要指标】平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值
Time per request: 71.760 [ms] (mean)
#【重要指标】并发平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值
Time per request: 7.176 [ms] (mean, across all concurrent requests)
#平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题
Transfer rate: 758.14 [Kbytes/sec] received
#网络上消耗的时间的分解,各项数据的具体算法还不是很清楚
Connection Times (ms)
min mean[+/-sd] media max
Connect: 0 0 0.0 0 0
Processing: 0 70 112.9 31 406
Waiting: 0 67 108.5 31 396
Total: 0 70 112.9 31 406
#下面的内容为整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,
#其中 50% 的用户响应时间小于 31毫秒,80 % 的用户响应时间小于 47毫秒,最大的响应时间小于 406毫秒
Percentage of the requests served within a certain time (ms)
50% 31
66% 31
75% 47
80% 47
90% 406
95% 406
98% 406
99% 406
100% 406 (longest request)