2017 © Pedro Peláez
 

library yii-pinba

image

bankiru/yii-pinba

  • Tuesday, June 14, 2016
  • by ekho
  • Repository
  • 8 Watchers
  • 0 Stars
  • 4,986 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Pinba extension for Yii framework Latest Stable Version Total Downloads

Simple Yii extension that incapsulates Pinba configuration and methods.

Build Status Scrutinizer Code Coverage Status Coveralls Code Coverage Status Scrutinizer Quality Score SensioLabsInsight Dependency Status HHVM Status License, (*1)

Installing

You should install php pinba extension manually. See documentation., (*2)

Composer

"require": {
  "bankiru/yii-pinba": "~0.1"
}

Github

Releases of Pinba extension for Yii framework are available on Github., (*3)

Documentation

To enable this extension you need add Pinba to component list in config.php and do some simple configurations, (*4)

'pinba' => array(
    'class'         => 'Bankiru\\Yii\\Profiling\\Pinba\\Pinba',
    'fixScriptName' => true, // changes script_name in pinba to controller/action or to command args in cli mode. Default true
    'scriptName'    => null,   // default null (if null pinba would use autodetect)
    'hostName'      => null, // default null (if null pinba would use autodetect)
    'serverName'    => null, // default null (if null pinba would use autodetect)
    'schema'        => null, // default null (if null pinba would use autodetect)
    'profileEvents' => [], // default empty array
)

In addition you need to add pinba extension to preload section., (*5)

Available 2 methods to profile., (*6)

  • through direct call Timer class
  • using yii events

Timers class

Timer class has static methods:, (*7)

  • start
  • stop
  • add
  • delete
  • tagsMerge
  • tagsReplace
  • dataMerge
  • dataReplace
  • getInfo
  • getAll
  • stopAll

which wraps pinba_* functions., (*8)

Yii events

Extension always tracks CApplication request (onBeginRequest, onEndRequest)., (*9)

Custom profilings can be added through config. For example:, (*10)

'pinba' => array(
    'class' => 'Bankiru\\Yii\\Profiling\\Pinba\\Pinba',
    'profileEvents' => [
        ['my-component-name', 'profiling_action_name', 'onBeginActionEventName', 'onEndActionEventName'],
    ],
)

The Versions

14/06 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

14/06 2016

v0.2.0

0.2.0.0

  Sources   Download

MIT

The Requires

 

23/04 2015

v0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires