{"id":15350944,"url":"https://github.com/kylixs/flare-profiler","last_synced_at":"2025-08-07T17:55:53.823Z","repository":{"id":36236372,"uuid":"201879957","full_name":"kylixs/flare-profiler","owner":"kylixs","description":"A Java profiler base on jvmti, with chrome flamegraph and slow method analysis. Java性能分析利器,欢迎加QQ群学习交流(837682428)","archived":false,"fork":false,"pushed_at":"2023-01-04T11:17:40.000Z","size":9977,"stargazers_count":68,"open_issues_count":53,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T06:52:22.747Z","etag":null,"topics":["flamegraph","java","java-profiler","jvm","jvmti","peformance-analytics","profiler","rust"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kylixs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-12T07:27:59.000Z","updated_at":"2025-02-02T22:14:51.000Z","dependencies_parsed_at":"2023-01-17T00:46:08.044Z","dependency_job_id":null,"html_url":"https://github.com/kylixs/flare-profiler","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/kylixs/flare-profiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylixs%2Fflare-profiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylixs%2Fflare-profiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylixs%2Fflare-profiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylixs%2Fflare-profiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kylixs","download_url":"https://codeload.github.com/kylixs/flare-profiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kylixs%2Fflare-profiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267505099,"owners_count":24098346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flamegraph","java","java-profiler","jvm","jvmti","peformance-analytics","profiler","rust"],"created_at":"2024-10-01T11:59:55.204Z","updated_at":"2025-07-28T11:02:56.223Z","avatar_url":"https://github.com/kylixs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flare Profiler\n[English Document](README_EN.md)    \n\n一个基于JVMTI技术的Java诊断工具，支持快速分析JVM线程CPU时间及方法调用栈，集成了灵活好用的动态火焰图组件，Java服务性能优化利器。  \n\n当你遇到以下类似的问题时，Flare Profiler可以帮助你解决问题： \n- Java服务在高并发时存在瓶颈，吞吐量较低，无从下手\n- 某些计算任务耗时很长，处理逻辑非常复杂，难以分析\n- 线上服务突然变慢，不知道是什么原因导致\n- 某些比较复杂的开源项目或者框架代码分支太多，通过调试来分析比较麻烦\n- 作为架构师，想将性能调优工作下放到业务组，缺少一个简单好用的工具\n\n\n\nFlare Profiler 0.1.0 只是一个雏形，有很多好点子还没有细化下来，想收集了解大家在Java性能调优过程遇到的一些疑难问题。  \n接下来可能做的功能：  \n- 完整的带时序的方法调用树，面向学习分析开源项目（区别于通过定时取样获取的部分方法调用栈，而是通过监控方法进入退出获取到完整的带时序的方法调用树，方便回溯分析任意代码分支）\n- 某个时刻的线程调用栈切面，方便分析资源竞争问题\n- 分析线程锁等待时间\n- 分析对象分配情况（计划参考Yourkit Java Profiler的功能，关联创建对象到发生的调用栈上，这个功能非常实用）\n  \n**关于github下载慢的问题，建议加QQ群（837682428），从群共享文件下载。**\n\n使用文档：  \n[入门指南 Quick Start](doc/quick-start.md)\n\n\n### 关键特性\n- 支持带时序的方法调用栈分析，直观准确反映任意一次请求执行的过程\n- 整合了Chrome浏览器开发工具的火焰图组件，支持鼠标缩放、拖动查看方法调用栈，操作流畅，高效快捷\n- 支持实时分析和离线分析，自动分卷保存取样结果\n- 支持多会话，可多人同时使用，可同时接入多个Agent或打开存档\n- 使用Rust语言编写，运行稳定，资源占用低，只需不到20MB内存，适合在容器内或者开发环境使用\n- 支持多平台（Windows, Linux and macOS）\n\n### 原理介绍\n\nFlare Profiler 系统交互图如下：  \n![系统交互图](doc/design/flare-profiler-interaction.png)  \n  \n\n##### 主要功能模块  \n- flare-agent: 基于JVMTI技术注入JVM进程中运行，负责进行周期采样获取线程CPU时间及线程方法调用栈等数据。后续会增加对象分配、锁检查、GC活动等功能。\n- flare-server: 查询分析服务，负责收集采样数据并保存到本地文件，提供查询分析服务接口，如获取线程CPU时间统计图，获取某个时间范围的线程方法调用栈统计数据等。\n- flare-ui: 诊断分析交互界面，主要包括展示线程CPU时间图表、方法调用栈火焰图等。\n  \n### 功能对比\n以下对比常见工具的JVM CPU 诊断功能：   \n   \n| 项目      | JProfiler |  Async Profiler | Flare Profiler |\n| -------- | --------: | :-------------: |:------------:  |\n| 内存占用   | 大于512MB   |   ？     |  小于20MB     |\n| 火焰图     |   不支持 | 支持，静态SVG | 支持，动态缩放、拖动查看   |\n| 方法调用时序 |  不支持 |  不支持 |  支持直观查看方法执行过程  |\n| 实时/离线分析 |  支持实时查看，Agent断开后不能分析 |  不支持实时查看 |  支持实时和离线分析  |\n| 稳定性 | 压测时JVM可能Crash | ？ | 压测时仍然稳定运行 |\n| 兼容性 | 支持多种平台 | 不支持Windows | 支持Windows、Linux、macOS |\n\n\n### 常见问题\n~~1、可能超出最大可打开的文件数量~~(**此问题已经解决**)  \nsave summary info failed: Too many open files (os error 24)  \n原因：  \n   Flare Profiler为每个JVM线程创建两个文件，如果JVM线程太多，将导致打开或者保存文件失败。  \n解决办法：  \n   ulimit -a #查看系统的文件句柄数量设置，如果太少，请改大一点  \n   macOS参考命令:  \n   ```bash\n   sudo launchctl limit maxfiles 999999999 999999999  \n   sudo ulimit -n 65535  \n   ulimit -n 65535  \n   ```\n\n   \n2、方法调用栈火焰图（Call Graph标签页）加载异常  \n火焰图组件来源于Chrome浏览器调试工具项目（devtools），仅支持在Chrome浏览器77以上版本运行，如果出现显示异常请升级Chrome到最新版本或者使用Protable版本。\n\n\nLinks:  \n- [入门指南 Quick Start](doc/quick-start.md)  \n- [v0.1.0-alpha 版本介绍](https://github.com/kylixs/kylixs.github.io/blob/master/flare-profiler-v0.1.0-alpha-demo.md)\n\n**Flare Profiler 开源交流QQ群： 837682428，欢迎加群一起探讨学习Java \u0026 Rust !**  \n![Flare Profiler 开源交流QQ群： 837682428](doc/flare-profiler-qq-group.png)  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylixs%2Fflare-profiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylixs%2Fflare-profiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylixs%2Fflare-profiler/lists"}