{"id":15132942,"url":"https://github.com/linshunkang/myperf4j","last_synced_at":"2025-05-14T18:04:24.660Z","repository":{"id":39176922,"uuid":"124743561","full_name":"LinShunKang/MyPerf4J","owner":"LinShunKang","description":"High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.","archived":false,"fork":false,"pushed_at":"2024-09-08T14:04:17.000Z","size":1295,"stargazers_count":3442,"open_issues_count":6,"forks_count":548,"subscribers_count":121,"default_branch":"develop","last_synced_at":"2025-04-10T11:02:27.848Z","etag":null,"topics":["agent","apm","bytecode","diagnosis","java-agent","jvm-monitor","metrics","microservices","monitor","monitoring","monitoring-tool","observability","performance","performance-analysis","performance-metrics","performance-monitoring","performance-tuning","performance-visualization","profiler","profiling"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinShunKang.png","metadata":{"files":{"readme":"README.CN.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-11T09:58:44.000Z","updated_at":"2025-04-10T08:23:22.000Z","dependencies_parsed_at":"2023-09-24T13:25:24.469Z","dependency_job_id":"e4b0a057-565d-4535-916b-032b34a42ba0","html_url":"https://github.com/LinShunKang/MyPerf4J","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinShunKang%2FMyPerf4J","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinShunKang%2FMyPerf4J/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinShunKang%2FMyPerf4J/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinShunKang%2FMyPerf4J/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinShunKang","download_url":"https://codeload.github.com/LinShunKang/MyPerf4J/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198453,"owners_count":22030964,"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","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":["agent","apm","bytecode","diagnosis","java-agent","jvm-monitor","metrics","microservices","monitor","monitoring","monitoring-tool","observability","performance","performance-analysis","performance-metrics","performance-monitoring","performance-tuning","performance-visualization","profiler","profiling"],"created_at":"2024-09-26T04:41:51.167Z","updated_at":"2025-05-14T18:04:24.466Z","avatar_url":"https://github.com/LinShunKang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"简体中文 | [English](./README.EN.md)\n\n\u003ch1 align=\"center\"\u003eMyPerf4J\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n一个针对高并发、低延迟应用设计的高性能 Java 性能监控和统计工具。\n\n[![GitHub (pre-)release](https://img.shields.io/github/release/LinShunKang/MyPerf4J/all.svg)](https://github.com/LinShunKang/MyPerf4J) [![Build Status](https://app.travis-ci.com/LinShunKang/MyPerf4J.svg?token=ptySgyLwQwqyUv5eCp5Q\u0026branch=develop)](https://app.travis-ci.com/LinShunKang/MyPerf4J) [![Coverage Status](https://coveralls.io/repos/github/LinShunKang/MyPerf4J/badge.svg?branch=develop)](https://coveralls.io/github/LinShunKang/MyPerf4J?branch=develop) [![GitHub issues](https://img.shields.io/github/issues/LinShunKang/MyPerf4J.svg)](https://github.com/LinShunKang/MyPerf4J/issues) [![GitHub closed issues](https://img.shields.io/github/issues-closed/LinShunKang/MyPerf4J.svg)](https://github.com/LinShunKang/MyPerf4J/issues?q=is%3Aissue+is%3Aclosed) [![GitHub](https://img.shields.io/github/license/LinShunKang/MyPerf4J.svg)](./LICENSE)\n\n\u003c/div\u003e\n\n## 价值\n* 快速定位性能瓶颈\n* 快速定位故障原因\n\n## 优势\n* [高性能](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%80%A7%E8%83%BD%E5%BC%80%E9%94%80): 单线程支持每秒 **1600 万次** 响应时间的记录，每次记录只花费 **63 纳秒**\n* [无侵入](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86#%E6%95%B0%E6%8D%AE%E9%87%87%E9%9B%86): 采用 **JavaAgent** 方式，对应用程序完全无侵入，无需修改应用代码\n* [低内存](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%AE%9E%E7%8E%B0%E5%8E%9F%E7%90%86#%E6%95%B0%E6%8D%AE%E5%AD%98%E5%82%A8): 采用**内存复用**的方式，整个生命周期只产生极少的临时对象，不影响应用程序的 GC\n* 高实时: 支持**秒级统计**，最低统计粒度为 **1 秒**，并且是**全量统计**，不丢失任何一次记录\n\n## 文档\n* [English Doc](https://github.com/LinShunKang/MyPerf4J/wiki/English-Doc)\n* [中文文档](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc)\n\n## 监控指标\nMyPerf4J 为每个应用收集数十个监控指标，所有的监控指标都是实时采集和展现的。\n\n下面是 MyPerf4J 目前支持的监控指标列表:\n- **[Method Metrics](https://grafana.com/dashboards/7766)**\u003cbr/\u003e\n  [RPS，Count，Avg，Min，Max，StdDev，TP50, TP90, TP95, TP99, TP999, TP9999, TP100](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#method-metrics)\n  ![Markdown](https://raw.githubusercontent.com/LinShunKang/Objects/master/MyPerf4J-InfluxDB-Method_Show_Operation.gif)\n\n- **[JVM Metrics](https://grafana.com/dashboards/8787)**\u003cbr/\u003e\n  [Thread](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-thread-metrics)，[Memory](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-memory-metrics)，[ByteBuff](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-bytebuff-metrics)，[GC](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-gc-metrics)，[Class](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-class-metrics)，[Compilation](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-compilation-metrics)，[FileDescriptor](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8C%87%E6%A0%87#jvm-filedescriptor-metrics)\n  ![Markdown](https://github.com/LinShunKang/Objects/blob/master/images/JVM_Metrics_Dashboard_V2.png?raw=true)\n\n  \u003e 想知道如何实现上述效果？请先按照[快速启动](https://github.com/LinShunKang/MyPerf4J#%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8)的描述启动应用，再按照[这里](https://github.com/LinShunKang/MyPerf4J/wiki/InfluxDB_)的描述进行安装配置即可。\n\n## 快速启动\nMyPerf4J 采用 JavaAgent 配置方式，**透明化**接入应用，对应用代码完全**没有侵入**。\n\n### 下载\n* 下载并解压 [MyPerf4J-ASM.zip](https://github.com/LinShunKang/Objects/blob/master/zips/CN/MyPerf4J-ASM-3.5.0-SNAPSHOT.zip?raw=true)\n* 阅读解压出的 `README` 文件\n* 修改解压出的 `MyPerf4J.properties` 配置文件中 `app_name`、`metrics.log.xxx` 和 `filter.packages.include` 的配置值\n\n\u003e 查看[配置文件模板](https://github.com/LinShunKang/Objects/blob/master/jars/MyPerf4J-3.x.properties)。想了解更多的配置？请看[这里](https://github.com/LinShunKang/MyPerf4J/wiki/3.x-%E9%85%8D%E7%BD%AE)\n\n### 配置\n在 JVM 启动参数里加上以下两个参数\n* -javaagent:/path/to/MyPerf4J-ASM.jar\n* -DMyPerf4JPropFile=/path/to/MyPerf4J.properties\n\n\u003e 形如：java -javaagent:/path/to/MyPerf4J-ASM.jar -DMyPerf4JPropFile=/path/to/MyPerf4J.properties `-jar yourApp.jar`\n\u003e\n\u003e 注意：如果您使用 JDK9 及其之上的版本，请额外添加 `--add-opens java.base/java.lang=ALL-UNNAMED`\n\n### 运行\n启动应用，监控日志输出到 /path/to/log/method_metrics.log:\n```\nMyPerf4J Method Metrics [2020-01-01 12:49:57, 2020-01-01 12:49:58]\nMethod[6]                            Type        Level  TimePercent      RPS  Avg(ms)  Min(ms)  Max(ms)    StdDev    Count     TP50     TP90     TP95     TP99    TP999   TP9999\nDemoServiceImpl.getId2(long)      General      Service      322.50%     6524     0.49        0        1     0.50      6524        0        1        1        1        1        1\nDemoServiceImpl.getId3(long)      General      Service      296.10%     4350     0.68        0        1     0.47      4350        1        1        1        1        1        1\nDemoServiceImpl.getId4(long)      General      Service      164.60%     2176     0.76        0        1     0.43      2176        1        1        1        1        1        1\nDemoServiceImpl.getId1(long)      General      Service        0.00%     8704     0.00        0        0     0.00      8704        0        0        0        0        0        0\nDemoDAO.getId1(long)         DynamicProxy          DAO        0.00%     2176     0.00        0        0     0.00      2176        0        0        0        0        0        0\nDemoDAO.getId2()             DynamicProxy          DAO        0.00%     2176     0.00        0        0     0.00      2176        0        0        0        0        0        0\n```\n\n### 卸载\n在 JVM 启动参数中去掉以下两个参数，重启即可卸载此工具。\n* -javaagent:/path/to/MyPerf4J-ASM.jar\n* -DMyPerf4JPropFile=/path/to/MyPerf4J.properties\n\n## 构建\n您可以自行构建 MyPerf4J-ASM.jar\n* git clone git@github.com:LinShunKang/MyPerf4J.git\n* mvn clean package\n\n\u003e MyPerf4J-ASM-${MyPerf4J-version}.jar 在 MyPerf4J-ASM/target/ 目录下\n\n## 问题\n如果您有任何问题、疑问或者建议，您可以 [提交Issue](https://github.com/LinShunKang/MyPerf4J/issues/new/choose) 或者 [发送邮件](mailto:linshunkang.chn@gmail.com) ：）\n\n注意，为了保障大家的时间，请保证您已经**完整阅读过**以下内容：\n* [提问模板](https://github.com/LinShunKang/MyPerf4J/wiki/%E6%8F%90%E9%97%AE%E6%A8%A1%E6%9D%BF)\n* [快速启动](https://github.com/LinShunKang/MyPerf4J#%E5%BF%AB%E9%80%9F%E5%90%AF%E5%8A%A8)\n* [中文文档](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc)\n* [常见问题](https://github.com/LinShunKang/MyPerf4J/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)\n\n## 已知用户\n如果您在使用 MyPerf4J，请告诉我，您的使用对我来说非常重要：[https://github.com/LinShunKang/MyPerf4J/issues/30](https://github.com/LinShunKang/MyPerf4J/issues/30)（按登记顺序排列）\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/LinShunKang/Objects/blob/master/logos/Boss_300x300.png?raw=true\" width=\"80\" height=\"80\"/\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://github.com/LinShunKang/Objects/blob/master/logos/Lever.jpeg?raw=true\" width=\"240\" height=\"80\"/\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\n\u003cimg src=\"https://github.com/LinShunKang/Objects/blob/master/logos/dianzhang_303x303.jpeg?raw=true\" width=\"80\" height=\"80\"/\u003e\n\u003c/div\u003e\n\n## 鸣谢\n感谢 JetBrains [OpenSourceSupport](https://www.jetbrains.com/community/opensource/#support) 所提供的支持 : )\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg\" width=\"200\" height=\"200\"/\u003e\n\u003c/div\u003e\n\n## 项目捐赠\n如果 MyPerf4J 对您有帮助，可以使用微信扫描下面的赞赏码，请我喝杯咖啡 : )\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/LinShunKang/Objects/blob/master/logos/WechatIMG16.jpeg?raw=true\" width=\"200\" height=\"200\"/\u003e\n\u003c/div\u003e\n\n## 参考项目\nMyPerf4J 是受以下项目启发而来：\n* [Perf4J](https://github.com/perf4j/perf4j)\n* [TProfiler](https://github.com/alibaba/TProfiler)\n\n## 更多信息\n想更深入的了解 MyPerf4J？请看 [https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc](https://github.com/LinShunKang/MyPerf4J/wiki/Chinese-Doc)。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinshunkang%2Fmyperf4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinshunkang%2Fmyperf4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinshunkang%2Fmyperf4j/lists"}