[root@centos python]# ab -n 100 -c 10 http://192.168.118.170/apidoc/index.html
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.118.170 (be patient).....done
Server Software: Apache/2.4.10
Server Hostname: 192.168.118.170
Server Port: 80
Document Path: /apidoc/index.html
Document Length: 11314 bytes
Concurrency Level: 10 【10个并发用户数】
Time taken for tests: 0.098 seconds【处理所有请求花费总时间】
Complete requests: 100【100个用户请求】
Failed requests: 0
Write errors: 0
Total transferred: 1182690 bytes【包括响应头信息+正文数据的长度】
HTML transferred: 1154028 bytes【正文数据长度,也就是减去了响应头信息】
Requests per second: 1023.42 [#/sec] (mean)【吞吐率 就是用 100/0.098=1020.408】
Time per request: 9.771 [ms] (mean)【用户平均请求等待时间 也就是用0.098/(100/10)=0.0098秒*1000就是9.8毫秒】
Time per request: 0.977 [ms] (mean, across all concurrent requests)【服务器平均请求处理时间 用0.098/100=0.00098秒*1000=0.98毫秒】
Transfer rate: 11820.15 [Kbytes/sec] received【单位时间内从服务器获取的时间长度也就是1182690/1024/0.098=11785 字节要转换为kb】
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 3.4 2 25
Processing: 2 7 6.5 5 30
Waiting: 0 3 4.7 3 26
Total: 5 9 7.1 7 33
Percentage of the requests served within a certain time (ms)
50% 7
66% 9
75% 9
80% 10
90% 28
95% 29
98% 32
99% 33
100% 33 (longest request)
[root@centos python]#
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 192.168.118.170 (be patient).....done
Server Software: Apache/2.4.10
Server Hostname: 192.168.118.170
Server Port: 80
Document Path: /apidoc/index.html
Document Length: 11314 bytes
Concurrency Level: 10 【10个并发用户数】
Time taken for tests: 0.098 seconds【处理所有请求花费总时间】
Complete requests: 100【100个用户请求】
Failed requests: 0
Write errors: 0
Total transferred: 1182690 bytes【包括响应头信息+正文数据的长度】
HTML transferred: 1154028 bytes【正文数据长度,也就是减去了响应头信息】
Requests per second: 1023.42 [#/sec] (mean)【吞吐率 就是用 100/0.098=1020.408】
Time per request: 9.771 [ms] (mean)【用户平均请求等待时间 也就是用0.098/(100/10)=0.0098秒*1000就是9.8毫秒】
Time per request: 0.977 [ms] (mean, across all concurrent requests)【服务器平均请求处理时间 用0.098/100=0.00098秒*1000=0.98毫秒】
Transfer rate: 11820.15 [Kbytes/sec] received【单位时间内从服务器获取的时间长度也就是1182690/1024/0.098=11785 字节要转换为kb】
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 3 3.4 2 25
Processing: 2 7 6.5 5 30
Waiting: 0 3 4.7 3 26
Total: 5 9 7.1 7 33
Percentage of the requests served within a certain time (ms)
50% 7
66% 9
75% 9
80% 10
90% 28
95% 29
98% 32
99% 33
100% 33 (longest request)
[root@centos python]#