3 Star 7 Fork 0

simon / yii2-xhprof

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.16 KB
一键复制 编辑 原始数据 按行查看 历史
simon 提交于 2015-04-21 15:30 . 基本功能完成,添加蹩脚英文说明

#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

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

搜索帮助