一:ab.exe的使用
ab.exe是Apache附带的压力测试工具,可以在web服务器本地模拟发起测试请求
1:进入Apache的bin目录
#输入命令
ab.exe -n 1000 -c 100 http://localhost/test/index.php;
index.php
<?php
#用循环来模拟处理业务逻辑
for($i = 0; $i <= 100; $i++) {
echo $i . '|';
}
CMD测试数据
Server Software: Apache/2.4.23
Server Hostname: localhost
Server Port: 80
Document Path: /index.php;
Document Length: 208 bytes
Concurrency Level: 100
Time