PHPackages                             zoa-chou/xhprof-collector - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. zoa-chou/xhprof-collector

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

zoa-chou/xhprof-collector
=========================

Single XHProf collector use XHProf API

v1.1.2(7y ago)714.3k↑22.9%2GPL-3.0PHPPHP &gt;=5.6

Since Aug 24Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ZoaChou/xhprof-collector)[ Packagist](https://packagist.org/packages/zoa-chou/xhprof-collector)[ Docs](https://github.com/ZoaChou/xhprof-collector)[ RSS](/packages/zoa-chou-xhprof-collector/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (7)DependenciesVersions (8)Used By (0)

xhprof-collector
================

[](#xhprof-collector)

Single XHProf collector use [XHProf](https://github.com/phacility/xhprof) API.

Notice that this is a collector only, so you have to get a gui to show collected data such as [xhgui](https://github.com/perftools/xhgui).

Tested php version
------------------

[](#tested-php-version)

- 5.6.36
- 7.0.30

> Notice:If you are running php under Kubernetes, you have to use tideways\_xhprof extension which only support php &gt;= 7.0 to avoid XHProf crash in hp\_execute\_internal.

Require
-------

[](#require)

### XHProf extension(either)

[](#xhprof-extensioneither)

- [uprofiler](https://github.com/FriendsOfPHP/uprofiler)
- tideways
- [tideways\_xhprof](https://github.com/tideways/php-xhprof-extension)(recommend)
- [xhprof](https://github.com/phacility/xhprof)

### mongo extension(either)

[](#mongo-extensioneither)

- [mongodb](http://php.net/manual/zh/mongodb.installation.php)(recommend)
- [mongo](http://php.net/manual/zh/mongo.installation.php)

Symfony Integration Example
---------------------------

[](#symfony-integration-example)

### Include(either)

[](#includeeither)

- Composer(recommend)

```
{
  "require" : {
    "zoa-chou/xhprof-collector": "*",
  }
}

```

- Single file

1. Copy xhprof-collector/src/collector.php to your path
2. Require collector to your project at first line, such as:

```
