DGPinbaLogRoute Extension ¶
DoubleGIS company presents Yii extensions for pinba. The DGPinbaLogRoute is a Yii Framework plugin that supply profiling your code with pinba extention.
Requirements ¶
- Yii 1.1.*
- pinba php extension (http://pinba.org/)
Installation ¶
- Unpack all files under your project 'component' folder
- Add in your project main.php configuration file next options:
Yii::getLogger()->autoDump = 1;
Yii::getLogger()->autoFlush = 1;
- Include your new extension into your project main.php configuration file:
'log' => array(
'class' => 'CLogRouter',
'routes' => array(
...
array(
'class' => 'application.components.DGPinbaLogRoute',
'enabled' => true,
'levels' => 'profile',
'enableContinuation' => false, // true if you want to combine timers with similar names
'sendTimeTag' => true, // true if you want send current time tag
),
...
),
)
- Enjoy!
Usage ¶
Profiling your code as you always do it with Yii:
Yii::beginProfile('timer name', 'category');
// Your_profiled_code();
Yii::endProfile('timer name', 'category');
Changelog ¶
1.0 Initial release
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.