./ab –c 10 –n 1000 http://127.0.0.1/index.php

-n 1000 表示总请求数为1000

-c 10 表示并发用户数为10

http://127.0.0.1/index.php表示这些请求的目标url

ad&mysqlslap压力测试_第1张图片

ad&mysqlslap压力测试_第2张图片

ad&mysqlslap压力测试_第3张图片

ad&mysqlslap压力测试_第4张图片


Linux 自带的字符浏览器elinks http://127.0.0.1/index.php


Mysqlslap测试

        Mysqlslap–a --only-print 自动生成测试表和数据并且全部打印出来

        Mysqlslap–a --concurreny=50,100 --numble-of-queries 1000 --debug-info 50100个并发分别得到一次测试结果(benchmark),并发数越多,执行完所有查询的时间越长

        Mysqlslap–a --concurreny=50,100 --numble-of-queries 1000 --iterations=5 --debug-info 50100为了准确多迭代5

        Mysqlslap–no-defaults –uroot –p123 –a --concurreny=50,100 --numble-of-queries 1000--iterations=5 --debug-info –engine=myisam,innodb 测试不同表引擎的性能对比