2017 © Pedro Peláez
 

library yii2-pinba

Pinba for Yii2

image

sp-niemand/yii2-pinba

Pinba for Yii2

  • Monday, November 9, 2015
  • by sp-niemand
  • Repository
  • 5 Watchers
  • 8 Stars
  • 1,395 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 1 Versions
  • 26 % Grown

The README.md

yii2-pinba

Description

Integrates pinba with Yii2, (*1)

Installation

Use composer to install:, (*2)

composer require sp-niemand/yii2-pinba, (*3)

Usage

Standard

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)

Low level

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');

The Versions

09/11 2015

dev-master

9999999-dev https://github.com/sp-niemand/yii2-pinba

Pinba for Yii2

  Sources   Download

MIT

The Requires

  • php >=5.4

 

by Dmitri Cherepovski

profile yii2 profiling pinba yii2-pinba