
/*在这个例子的一开始,我执行了这样一个命令 ab -n 10 -c 10 http://www.google.com/。这个命令的意思是启动 ab ,向 www.google.com 10个客户端(-n 10) ,每个客户端发送10个请求(-c 10)——也就是说一次都发过去了。跟着下面的是 ab 输出的测试报告,后面部分是我添加的注释。*/
C:\Documents and Settings\Administrator>C:\Apache2.2\bin\ab -n 10 -c 10 http://w
ww.google.cn/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.google.cn (be patient).....done
Server Software: GWS/2.1
Server Hostname: www.google.cn
Server Port: 80
Document Path: /
Document Length: 3010 bytes
Concurrency Level: 10
Time taken for tests: 10.437500 seconds
Complete requests: 10
Failed requests: 0
Write errors: 0
Total transferred: 33070 bytes
HTML transferred: 30100 bytes
Requests per second: 0.96 [#/sec] (mean)
Time per request: 10437.500 [ms] (mean)
Time per request: 1043.750 [ms] (mean, across all concurrent requests)
Transfer rate: 3.07 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 93 702 1259.9 109 3093
Processing: 266 2047 1726.6 3250 3938
Waiting: 265 2046 1726.7 3250 3937
Total: 375 2749 2223.5 3734 7031
Percentage of the requests served within a certain time (ms)
50% 3734
66% 3812
75% 3828
80% 3937
90% 7031
95% 7031
98% 7031
99% 7031
100% 7031 (longest request)
C:\Documents and Settings\Administrator>C:\Apache2.2\bin\ab -n 10 -c 10 http://w
ww.iknowing.cn/
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.iknowing.cn (be patient).....done
Server Software: Zope/(Zope
Server Hostname: www.iknowing.cn
Server Port: 80
Document Path: /
Document Length: 24031 bytes
Concurrency Level: 10
Time taken for tests: 44.281250 seconds /*整个测试持续的时间*/
Complete requests: 10 /*完成的请求数量*/
Failed requests: 0 /*失败的请求数量*/
Write errors: 0
Total transferred: 243620 bytes /*整个场景中的网络传输量*/
HTML transferred: 240310 bytes /*整个场景中的HTML内容传输量*/
Requests per second: 0.23 [#/sec] (mean) /*大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的mean表示这是一个平均值*//*每秒事务数*/
Time per request: 44281.250 [ms] (mean) /*大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值*//*平均响应时间*/
Time per request: 4428.125 [ms] (mean, across all concurrent requests))/*每个请求响应时间(平均)*/
Transfer rate: 5.35 [Kbytes/sec] received /*平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题*//*传输效率*/
Connection Times (ms)
min mean[+/-sd] median max
Connect: 109 124 12.7 125 140
Processing: 2859 13715 12510.3 8484 43391
Waiting: 2484 3901 1083.3 4515 5312
Total: 2968 13840 12505.8 8593 43500
/*下面的内容为整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中 50% 的用户响应时间小于 8593 毫秒,66 % 的用户响应时间小于 12937 毫秒,最大的响应时间小于 43500 毫秒*/
Percentage of the requests served within a certain time (ms)
50% 8593
66% 12937
75% 13859
80% 27953
90% 43500
95% 43500
98% 43500
99% 43500
100% 43500 (longest request)