apache+mysql+php ab测试

环境:

Apache:2.4.4

MySQL:5.6.12

php:5.4.12

测试1:

test2.php

php文件几乎为0

>ab -n 500 -c 500 http://127.0.0.1/test/test2.php

分表前的测试:用用户名(索引)查询用户信息,

$Tuser = T('user');
$r = mt_rand(0,9);
$username = 'username3000'.$r;
$Tuser->select('',array('username'=>$username));

>ab -n 1000 -c 1000 http://127.0.0.1/microblog/index.php/test/test_table

 

分表前的测试:用用户名(索引)查询用户信息,(同上)

>ab -n 5000 -c 50 http://127.0.0.1/microblog/index.php/test/test_table

原文地址:https://www.cnblogs.com/alazalazalaz/p/4029290.html