yii2 性能调优
- 2018-10-24 20:22:00
- CJL 原创
- 4132
可以通过debug模块进行性能检查
1、看数据库的执行时间(timeline)
2、看方法的执行时间(profiling)
在方法里添加
Yii::beginProfile('countryQueryCost');
Yii::endProfile('countryQueryCost');
可以嵌套,可以通过此方式统计中间代码的运行时间,数据在debug的profiling中查看。
发表评论