-How to use
- Install Pinba php extension, Pinba Engine with Intaro Pinboard
- Modify your composer json
{
"require": {
"pdffiller/php-pinba-profiler": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/pdffiller/php-pinba-profiler.git"
}
]
}
- add timers to your code
<?php
require('vendor/autoload.php');
use Pdffiller\PinbaProfiler\PinbaProfiler;
$tags = array('category'=>'Database', 'group'=>'ClassName::method', 'mytag'=>'tagValue');
PinbaProfiler::timerStart($tags);
sleep(1);
PinbaProfiler::timerStop($tags);
category: Database, Memcache, API etc group: TDb - subgroup or class, connect - operation
group must be separated with ::