lilocon / performance-monitor
This package is abandoned and no longer maintained.
No replacement package was suggested.
dev-master / 1.0.x-dev
2018-09-10 06:37 UTC
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.1
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-01-09 18:54:11 UTC
README
安装
$ composer require lilocon/performance-monitor '1.0.x-dev'
配置
注册 ServiceProvider
:
\Lilocon\PerformanceMonitor\PerformanceMonitorServiceProvider::class,
使用
➜ php artisan lilocon:pm:analyze 正在导入数据 导入成功:共导入44条数据 按访问量排序 ============ +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | Action | 访问量 | 总执行时间 | 平均查询次数 | 总数据库查询次数 | 总数据库查询时间 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | App\Http\Controllers\WelcomeController@index | 43 | 0.11 | 1.0000 | 43 | 18.77 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ 按总执行时间排序 ================ +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | Action | 访问量 | 总执行时间 | 平均查询次数 | 总数据库查询次数 | 总数据库查询时间 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | App\Http\Controllers\WelcomeController@index | 43 | 0.11 | 1.0000 | 43 | 18.77 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ 按平均查询次数排序 ================== +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | Action | 访问量 | 总执行时间 | 平均查询次数 | 总数据库查询次数 | 总数据库查询时间 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | App\Http\Controllers\WelcomeController@index | 43 | 0.11 | 1.0000 | 43 | 18.77 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ 按总数据库查询次数排序 ====================== +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | Action | 访问量 | 总执行时间 | 平均查询次数 | 总数据库查询次数 | 总数据库查询时间 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | App\Http\Controllers\WelcomeController@index | 43 | 0.11 | 1.0000 | 43 | 18.77 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ 按总数据库查询时间排序 ====================== +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | Action | 访问量 | 总执行时间 | 平均查询次数 | 总数据库查询次数 | 总数据库查询时间 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+ | App\Http\Controllers\WelcomeController@index | 43 | 0.11 | 1.0000 | 43 | 18.77 | +----------------------------------------------+--------+------------+--------------+------------------+------------------+
注意:开启ServiceProvider需要让应用跑一段时间生成日志才能分析
License
The MIT License (MIT). Please see License File for more information.