./ab -n number_of_total_requests
-c number_of_simultaneous_requests
http://your_web_server/your_php_app.php
例如:./ab -n 1000 -c 50 http://www.domain.com/myapp.php
AB将同时向http://www.domain.com/myapp.php发出50个并发请求,共发出1000次。
测试结果将可能是这样的:
Server Software: Apache/2.0.16
Server Hostname: localhost
Server Port: 80
Document Path: /myapp.php
Document Length: 1311 bytes
Concurrency Level: 50
Time taken for tests: 8.794 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 1754000 bytes
HTML transferred: 1311000 bytes
Requests per second: 113.71
Transfer rate: 199.45 kb/s received
Connection Times (ms)
min avg max
Connect: 0 0 5
Processing: 111 427 550
Total: 111 427 555