PHPackages                             sy-records/xhprof2flamegraph - 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. sy-records/xhprof2flamegraph

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

sy-records/xhprof2flamegraph
============================

将xhprof产生的数据转为可以生成flamegraph火焰图的格式并生成火焰图

v1.2.4(6y ago)11353↓100%1Apache-2.0PHPPHP &gt;=5.4

Since May 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/sy-records/xhprof2flamegraph)[ Packagist](https://packagist.org/packages/sy-records/xhprof2flamegraph)[ RSS](/packages/sy-records-xhprof2flamegraph/feed)WikiDiscussions master Synced 1mo ago

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

xhprof2flamegraph
=================

[](#xhprof2flamegraph)

🎨将xhprof产生的数据转为可以生成flame graph火焰图的格式并生成火焰图

安装
--

[](#安装)

```
composer require sy-records/xhprof2flamegraph

```

使用
--

[](#使用)

`vendor/bin`目录下有两个可执行文件，执行命令

```
./vendor/bin/xhprof2flamegraph -f ./test.xhprof | ./vendor/bin/flamegraph.pl > out.svg
```

> 替换对应的路径信息
>
> -f 为指定的`xhprof`日志文件，`json`格式 （如果日志文件为`serialize`序列化后的数据，请修改`src/Command/Command.php`文件中的第`40`行），自动处理`json`和`serialize`格式的数据

帮助
--

[](#帮助)

- xhprof2flamegraph -h

```
         _                               __   ____     __
 __  __ | |__    _ __    _ __    ___    / _| |___ \   / _|
 \ \/ / | '_ \  | '_ \  | '__|  / _ \  | |_    __) | | |_
  >  <  | | | | | |_) | | |    | (_) | |  _|  / __/  |  _|
 /_/\_\ |_| |_| | .__/  |_|     \___/  |_|   |_____| |_|
                |_|

Usage:
    xhprof2flamegraph [-h, --help] [-f, --profile] [--metrics]
Options:
    -h, --help      show help
    -f, --profile   file path of xhprof profile data
    --metrics       select target metrics (ect/ewt/ecpu/emu/epmu)
```

- flamegraph.pl -help

```
USAGE: ./flamegraph.pl [options] infile > outfile.svg

        --title TEXT     # change title text
        --subtitle TEXT  # second level title (optional)
        --width NUM      # width of image (default 1200)
        --height NUM     # height of each frame (default 16)
        --minwidth NUM   # omit smaller functions (default 0.1 pixels)
        --fonttype FONT  # font type (default "Verdana")
        --fontsize NUM   # font size (default 12)
        --countname TEXT # count type label (default "samples")
        --nametype TEXT  # name type label (default "Function:")
        --colors PALETTE # set color palette. choices are: hot (default), mem,
                         # io, wakeup, chain, java, js, perl, red, green, blue,
                         # aqua, yellow, purple, orange
        --hash           # colors are keyed by function name hash
        --cp             # use consistent palette (palette.map)
        --reverse        # generate stack-reversed flame graph
        --inverted       # icicle graph
        --negate         # switch differential hues (bluered)
        --notes TEXT     # add notes comment in SVG (for debugging)
        --help           # this message

        eg,
        ./flamegraph.pl --title="Flame Graph: malloc()" trace.txt > graph.svg
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~20 days

Recently: every ~29 days

Total

7

Last Release

2441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17615e789eec7042f64c6f4e8733421987d98fcdc4269395b42d2a7f0ae94301?d=identicon)[sy-records](/maintainers/sy-records)

---

Top Contributors

[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (24 commits)")

---

Tags

flamegraphtidewaysxhproftidewaysxhprofflamegraph

### Embed Badge

![Health badge](/badges/sy-records-xhprof2flamegraph/health.svg)

```
[![Health](https://phpackages.com/badges/sy-records-xhprof2flamegraph/health.svg)](https://phpackages.com/packages/sy-records-xhprof2flamegraph)
```

###  Alternatives

[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[maantje/xhprof-buggregator-laravel

Xhprof buggregator integration for Laravel

43272.6k](/packages/maantje-xhprof-buggregator-laravel)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)[renan/cakephp-xhprof

Plugin that quickly enables XHProf profiling for your CakePHP application.

2138.7k](/packages/renan-cakephp-xhprof)[staabm/xhprof.io

GUI to analyze the profiling data collected using XHProf - A Hierarchical Profiler for PHP.

424.4k](/packages/staabm-xhprofio)[sandstorm/plumber

Profiling Toolkit for Neos Flow and Neos

364.9k](/packages/sandstorm-plumber)

PHPackages © 2026

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