fbi / yii2-xhprof
Yii2 provide support for xhprof
V1.0.0
2015-04-21 10:58 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: >=2.0
This package is not auto-updated.
Last update: 2025-03-05 11:13:06 UTC
README
xhprof for yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require fbi/yii2-xhprof "*"
for dev-master
php composer.phar require fbi/yii2-xhprof "dev-master"
or add
"fbi/yii2-xhprof": "*"
to the require section of your composer.json
file.
Usage
add the following code to your entry script,for example: index.php
defined('YII_PROFILE') or define('YII_PROFILE',true);
then modify your application configuration as follows at the end of your config file:
if (YII_PROFILE){
$config['bootstrap'][] = 'xhprof';
$config['modules']['xhprof'] = [
'class'=>'fbi\xhprof\Module',
'frequency'=>1000,//record rate
'minExcutionTime'=>1,//
//'name'=>'linkserver',//xhprof source,default value: Yii::$app->id
//'dir'=>'/tmp',//record path ,default value: @runtime/xhprof/
];
}
- then you browse the profs var http://your.site.name/index.php?r=xhprof