2 Star 7 Fork 0

simon / yii2-xhprof

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
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

About

yii框架支持xhprof spread retract
PHP
MIT
Cancel

Releases

No release

Gitee Metrics

Contributors

All

Activities

load more
can not load any more
PHP
1
https://git.oschina.net/fbi/yii2-xhprof.git
git@git.oschina.net:fbi/yii2-xhprof.git
fbi
yii2-xhprof
yii2-xhprof
master

Search