# 安装
yum install -y httpd-tools
# 压测
ab -c 100 -n 100 http://localhost/member/index.php?act=seccode&op=makecode&type=50,120&nchash=a773092f&t=0.9891769412229554
-n 请求数
-c 并发量
# 指标
Requests per second : 每秒请求数
Time per request : 每个请求处理时间
# 建议
-
多使用内置函数,精简代码量,提高性能
-
经过 zend 引擎扫描解析成 opcodes 机器语言后才能执行,非常耗时,应减少这一过程