MyPerf4J
MyPerf4J is a Java application performance monitoring (APM) tool that uses bytecode instrumentation via JavaAgent to monitor method execution times and JVM metrics without modifying application code. It claims to support 16 million operations per second with minimal memory overhead and 1-second monitoring granularity.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | LinShunKang/MyPerf4J |
| Owner | LinShunKang |
| Primary language | Java |
| License | BSD-3-Clause — OSI-approved |
| Stars | 3.6k |
| Forks | 556 |
| Open issues | 7 |
| Latest release | 3.6.0 (2025-11-16) |
| Last updated | 2026-07-08 |
| Source | https://github.com/LinShunKang/MyPerf4J |
What MyPerf4J is
MyPerf4J operates as a JavaAgent that instruments Java bytecode using ASM to capture method-level latency metrics (RPS, percentiles TP50–TP9999, min/max/avg/stddev), JVM thread/memory/GC metrics, and outputs results to log files. The tool stores metrics in memory with object reuse, exports to InfluxDB for visualization, and requires JVM parameter configuration at startup.
Get the MyPerf4J source
Clone the repository and explore it locally.
git clone https://github.com/LinShunKang/MyPerf4J.gitcd MyPerf4J# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires JVM parameter injection at startup (-javaagent and -DMyPerf4JPropFile); cannot be attached or detached at runtime without restart.
- Configuration via MyPerf4J.properties file; must define app_name, metrics log location, and filter.packages.include to specify which classes to instrument.
- Outputs metrics to log files by default; InfluxDB integration requires manual setup (dashboards linked in README but configuration steps not fully detailed in provided excerpt).
- JDK 9+ requires additional flag --add-opens java.base/java.lang=ALL-UNNAMED; verify compatibility with your JDK and application module configuration.
- Memory footprint minimal per claims, but actual heap/CPU overhead impact depends on number of instrumented methods and monitoring interval; load-testing recommended before production deployment.
When to avoid it — and what to weigh
- Distributed tracing across services is required — MyPerf4J captures per-JVM metrics and method-level latency but does not provide cross-service request tracing, correlation IDs, or integration with standard distributed tracing backends (e.g., Jaeger, Zipkin).
- Custom metric definitions or high-cardinality tag-based filtering — The tool offers a fixed set of metrics (method latency percentiles, JVM stats); if you need application-specific counters, gauges, or dynamic tag-based filtering, extensibility is unclear from the data.
- Strict data governance or on-premise observability stack with proprietary tooling — Metrics are exported to files and InfluxDB; if your organization requires direct integration with commercial APM platforms (New Relic, Datadog, AppDynamics) or air-gapped infrastructure, feasibility is Unknown.
- Support for non-JVM languages or polyglot monitoring — MyPerf4J is Java-only. Multi-language or polyglot infrastructure will require separate monitoring solutions.
License & commercial use
Licensed under BSD-3-Clause (BSD 3-Clause 'New' or 'Revised' License), a permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and liability disclaimer.
BSD-3-Clause is a permissive OSI license that permits commercial use without restriction. However, integration with proprietary systems, long-term support, and commercial indemnification are not addressed in the license. Consult internal compliance review before deploying in mission-critical production systems.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
MyPerf4J instruments bytecode at runtime using ASM and requires -javaagent privilege. No disclosure of security audit, threat model, or vulnerability handling process in provided data. Consider: (1) Does instrumentation of sensitive method signatures leak confidential data to log files? (2) Are log files encrypted or access-controlled? (3) Is bytecode transformation vetted against bytecode injection attacks? Requires security review before use in regulated environments.
Alternatives to consider
Datadog APM Agent (Java)
Proprietary; provides distributed tracing, auto-instrumentation, third-party library support, and managed platform with compliance certifications. Easier out-of-box integration but comes with SaaS cost and vendor lock-in.
Elastic APM Java Agent
Open-source APM agent with distributed tracing, custom metrics, and integration into Elastic Stack (ELK). Offers more observability depth than MyPerf4J but requires separate infrastructure and more operational overhead.
Java Flight Recorder (JFR) + Mission Control
Built into modern JDK; low-overhead, production-safe profiling with detailed CPU, memory, and I/O events. No third-party dependency but lacks method-level percentile aggregation and real-time dashboard by default.
Build on MyPerf4J with DEV.co software developers
MyPerf4J offers lightweight, non-invasive APM for Java microservices and monoliths. Before production deployment, verify integration with your observability backend (InfluxDB, Grafana, or ELK), conduct load testing to measure overhead, and review security implications of bytecode instrumentation. Consult Devco if you need guidance on integration, deployment, or alternative APM solutions.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
MyPerf4J FAQ
Can MyPerf4J be attached to a running JVM without restart?
What is the performance overhead of instrumentation?
Does MyPerf4J support distributed tracing or service-to-service correlation?
Is MyPerf4J suitable for production use in regulated industries?
Custom software development services
Need help beyond evaluating MyPerf4J? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source observability integrations — and maintain them long-term.
Evaluate MyPerf4J for Your Java Observability Stack
MyPerf4J offers lightweight, non-invasive APM for Java microservices and monoliths. Before production deployment, verify integration with your observability backend (InfluxDB, Grafana, or ELK), conduct load testing to measure overhead, and review security implications of bytecode instrumentation. Consult Devco if you need guidance on integration, deployment, or alternative APM solutions.