weiyongsheng / laravel-performance
There is no license information available for the latest version (1.4.1) of this package.
laravel performance and sql dump.
1.4.1
2017-04-15 09:40 UTC
Requires
- php: >=5.4.0
Requires (Dev)
- phpunit/phpunit: ^4.8 || ^5.0
This package is not auto-updated.
Last update: 2024-12-21 21:36:41 UTC
README
- 计算代码块的执行时长
- 打印代码块的sql
Usage
- 计算代码块的执行时长
pf()->auto('search1'); #代码块 pf()->auto('search1'); var_dump(pf()->getBenchmarkTime()); ##### or ##### pf()->start('search2'); #代码块 pf()->end('search2'); var_dump(pf()->getBenchmarkTime());
- 打印代码块的sql
pf()->startRecordQueries(); #sql查询代码 $sql = pf()->getSql(); var_dump($sql);