承接 sy-records/xhprof2flamegraph 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sy-records/xhprof2flamegraph

Composer 安装命令:

composer require sy-records/xhprof2flamegraph

包简介

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

README 文档

README

🎨将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行),自动处理jsonserialize格式的数据

帮助

  • 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 (blue<->red)
        --notes TEXT     # add notes comment in SVG (for debugging)
        --help           # this message

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

sy-records/xhprof2flamegraph 适用场景与选型建议

sy-records/xhprof2flamegraph 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 353 次下载、GitHub Stars 达 11, 最近一次更新时间为 2019 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「xhprof」 「tideways」 「flamegraph」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sy-records/xhprof2flamegraph 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sy-records/xhprof2flamegraph 我们能提供哪些服务?
定制开发 / 二次开发

基于 sy-records/xhprof2flamegraph 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 353
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2019-05-04