0
选项在AB Linux命令为基准在 http://linux.die.net/man/1/ab描述的NodeJS并发进程基准,Linux命令AB对
-n数目的并发
的请求 -c数目例如命令来获得统计量结果在请求index.html的(文件大小= 5937个字节)
ab -n 1000 -c 1000 http://localhost:8000/ and show the output as follows
我的问题是命令执行1000个并发进程从获得的index.html在1000倍e nodejs在相同的开始时间处理对吗?为什么我需要指定-n 1000?如何用-n 1000和-c 1000一起描述命令?我相信-n选项只设置了请求重试次数,前提是前一个请求对于一个进程请求失败。对 ?
The command output on apache Centos
==================================
Server Hostname: localhost
Server Port: 8000
Document Path: /
Document Length: 5937 bytes
Concurrency Level: 1000
Time taken for tests: 0.725 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 6052000 bytes
HTML transferred: 5937000 bytes
Requests per second: 1378.45 [#/sec] (mean)
Time per request: 725.455 [ms] (mean)
Time per request: 0.725 [ms] (mean, across all concurrent requests)
Transfer rate: 8146.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 21 30.0 0 83
Processing: 25 135 74.2 94 286
Waiting: 24 135 74.2 93 286
Total: 54 156 80.3 131 351
Percentage of the requests served within a certain time (ms)
50% 131
66% 227
75% 238
80% 242
90% 257
95% 266
98% 269
99% 272
100% 351 (longest request)
所以你的意思是1000 * 1000的进程请求在同一时间启动? – aabb 2014-09-03 12:18:46
什么是不同的(-n 10 -c 1000)和(-n 1000 -c 1000)相同-c? – aabb 2014-09-03 12:19:32
不停止思考同时请求。 'ab'并不总是同时提出所有请求。 – 2014-09-03 12:19:54