以下,是一个ab测试返回的结果,作一个分析说明
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 gameapp.37.com (be patient)
Server Software: nginx #响应服务器类型
Server Hostname: gameapp.37.com #响应服务器域名
Server Port: 80 #请求端口
Document Path: /controller/enter_game.php?game_id=275&sid=1 #请求的地址
Document Length: 0 bytes #返回长度,只有静态文件才有长度
Concurrency Level: 200 #并发数
Time taken for tests: 0.273807 seconds #共使用了多少时间
Complete requests: 200 #请求总数
Failed requests: 0 #失败请求
Write errors: 0
Non-2xx responses: 200
Total transferred: 98400 bytes #总共传输字节数,包含http的头信息等
HTML transferred: 0 bytes #html字节数,实际的页面传递字节数
Requests per second: 730.44 [#/sec] (mean) #每秒多少请求,这个是非常重要的参数数值,服务器的吞吐量
Time per request: 273.807 [ms] (mean) #用户平均请求等待时间
Time per request: 1.369 [ms] (mean, across all concurrent requests) #服务器平均处理时间,也就是服务器吞吐量的倒数
Transfer rate: 350.61 [Kbytes/sec] received #每秒获取的数据长度
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 8 6.3 8 21
Processing: 150 197 39.3 218 258
Waiting: 136 192 42.8 216 257
Total: 155 206 42.3 229 269
Percentage of the requests served within a certain time (ms)
50% 229 # 50%的请求在229ms内返回
66% 237
75% 239
80% 254
90% 261
95% 263
98% 267
99% 268
100% 269 (longest request)