服務器負載太大而影響程序效率也是很常見的
Apache 服務器自帶有一個叫AB(ApacheBench)的工具
在命令行下輸出
例如
AB將同時向發出
測試結果將可能是這樣的
Server Software: Apache/
Server Hostname: localhost
Server Port:
Document Path: /myapp
Document Length:
Concurrency Level:
Time taken for tests:
Complete requests:
Failed requests:
Total transferred:
HTML transferred:
Requests per second:
Transfer rate:
Connection Times (ms)
min avg max
Connect:
Processing:
Total:
myapp
如果你想得到更詳細的信息
記下每次的參數
要指出的是
From:http://tw.wingwit.com/Article/program/PHP/201311/20799.html