PHPackages                             zhoyoung/yii2-xhprof - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zhoyoung/yii2-xhprof

ActiveYii2-extension

zhoyoung/yii2-xhprof
====================

Yii2 provide support for xhprof

1.0.3(6y ago)0196MITPHPPHP &gt;=5.4.0

Since Jun 21Pushed 6y agoCompare

[ Source](https://github.com/zhoyoung/yii2-xhprof)[ Packagist](https://packagist.org/packages/zhoyoung/yii2-xhprof)[ Docs](https://github.com/zhoyoung/yii2-xhprof)[ RSS](/packages/zhoyoung-yii2-xhprof/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (5)Used By (0)

\#yii2-xhprof xhprof for yii2
=============================

[](#yii2-xhprofxhprof-for-yii2)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require zhoyoung/yii2-xhprof "*"

```

for dev-master

```
php composer.phar require zhoyoung/yii2-xhprof "dev-master"

```

or add

```
"zhoyoung/yii2-xhprof": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

1. add the following code to your entry script,for example: index.php

```
defined('YII_ENV') or define('YII_ENV', 'dev');
```

2. then modify your application configuration as follows at the end of your config file:

```
if (YII_ENV_DEV){
    $config['bootstrap'][] = 'xhprof';
    $config['modules']['xhprof'] = [
        'class'=>'zhoyoung\xhprof\Module',
        //控制抓取频率，如果为1则全部抓取
        'frequency' => 1,
        //超过限制秒数就抓取
        'minExcutionTime' => 1,
        //默认源Yii::$app->id
		//'name'=>'linkserver',
		//记录路径，默认: @runtime/xhprof/
		//'dir'=>'/tmp',
	];
}
```

3. then you browse the profs var

\[\]

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

2518d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/720aa991a2faea0f14c08a2f86ab7f5015b08b56322c42382102c2d369f9eecc?d=identicon)[ZhouYangY](/maintainers/ZhouYangY)

---

Tags

phpyii2xhprof

### Embed Badge

![Health badge](/badges/zhoyoung-yii2-xhprof/health.svg)

```
[![Health](https://phpackages.com/badges/zhoyoung-yii2-xhprof/health.svg)](https://phpackages.com/packages/zhoyoung-yii2-xhprof)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
