Score
0
Watch 2 Star 7 Fork 0

simon / yii2-xhprofPHPMIT

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
yii框架支持xhprof spread retract

Clone or download
Loading...
README.md

#yii2-xhprof 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

  1. add the following code to your entry script,for example: index.php
defined('YII_PROFILE') or define('YII_PROFILE',true);
  1. 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/
	];
}
  1. then you browse the profs var http://your.site.name/index.php?r=xhprof

sanwkj@163.com

Comments ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/fbi/yii2-xhprof.git
git@gitee.com:fbi/yii2-xhprof.git
fbi
yii2-xhprof
yii2-xhprof
master

Help Search