|
用apache的ab工具
ab -n 1000 -c 10 http://localhost
控制器只是默认的:
public function index()
{
$this->load->view('welcome_message');
}
结果为:
C:\Apache2.2\bin>ab -n 1000 -c 10 http://localhost/
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 localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests
Server Software: Apache/2.2.21
Server Hostname: localhost
Server Port: 80
Document Path: /
Document Length: 1926 bytes
Concurrency Level: 10
Time taken for tests: 13.475 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 2114000 bytes
HTML transferred: 1926000 bytes
Requests per second: 74.21 [#/sec] (mean)
Time per request: 134.748 [ms] (mean)
Time per request: 13.475 [ms] (mean, across all concurrent requests)
Transfer rate: 153.21 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.6 0 16
Processing: 47 134 50.6 125 359
Waiting: 47 134 50.6 125 359
Total: 47 134 50.6 125 359
Percentage of the requests served within a certain time (ms)
50% 125
66% 156
75% 172
80% 172
90% 187
95% 219
98% 265
99% 297
100% 359 (longest request)
每秒只能处理74次请求,这正常么?
|
|