kr4y / profiler
Laravel 4 的性能分析器
1.0.2
2013-05-24 14:32 UTC
Requires
- php: >=5.3.0
- illuminate/support: 4.0.x
- illuminate/view: 4.0.x
This package is not auto-updated.
Last update: 2024-09-23 11:16:45 UTC
README
Laravel 4 的性能分析器
安装
在 composer.json
文件中
{ "require-dev": { "kr4y/profiler": "dev-master" }, }
在 app/config/app.php
中
'providers' => array( ... 'Kr4Y\Profiler\ProfilerServiceProvider', ... ), 'aliases' => array( ... 'Profiler' => 'Kr4Y\Profiler\Facades\Profiler', ...
如果您需要禁用性能分析器(默认情况下在 production
环境中已禁用),发布包配置 php artisan config:publish kr4y/profiler
并将 'enabled' => false
设置为
性能分析器快照点的使用
Profiler::startPoint('sample snapshot point'); ..... Profiler::endPoint('sample snapshot point');