dev-master
9999999-dev https://github.com/sp-niemand/yii2-pinbaPinba for Yii2
MIT
The Requires
- php >=5.4
by Dmitri Cherepovski
profile yii2 profiling pinba yii2-pinba
Wallogit.com
2017 © Pedro Peláez
Pinba for Yii2
Integrates pinba with Yii2, (*1)
Use composer to install:, (*2)
composer require sp-niemand/yii2-pinba, (*3)
Add the main component and the log target to the config., (*4)
'bootstrap' => [/* ... */ 'pinba' /* ... */],
'components' => [
// ...
'pinba' => [
'class' => \yiiPinba\component\Pinba::className(),
],
// ...
'log' => [
'targets' => [
// ...
[
'class' => \yiiPinba\log\Target::className(),
],
// ...
]
]
// ...
]
The target handles export of the profile logs to Pinba. Use standard Yii2 method for profiling:, (*5)
\Yii::beginProfile($token, $category); // ... \Yii::endProfile($token, $category);
Bootstrapping is needed if you want to automatically time actions run., (*6)
Of course, you can use methods from the component directly:, (*7)
$p = \Yii::$app->get('pinba');
/** @var Pinba $p */
$p->startTimer('timer1');
// ...
$p->stopTimer('timer1');
Pinba for Yii2
MIT
profile yii2 profiling pinba yii2-pinba