JFR for profiling
Profile any Java app with the built-in Flight Recorder — no external tools.
Porównanie kodu
✕ Java 8
// Install VisualVM / YourKit / JProfiler // Attach to running process // Configure sampling // Export and analyze // External tool required
✓ Java 9+
// Start with profiling enabled
$ java -XX:StartFlightRecording=
filename=rec.jfr MyApp
// Or attach to running app:
$ jcmd <pid> JFR.start
Widzisz problem z tym kodem? Daj nam znać.
Dlaczego nowoczesne podejście wygrywa
Built-in
No external profiler to install or license.
Low overhead
~1% performance impact — safe for production.
Rich events
CPU, memory, GC, threads, I/O, locks, and custom events.
Stare podejście
External Profiler
Nowoczesne podejście
Java Flight Recorder
Od JDK
9
Poziom trudności
Średniozaawansowany
Wsparcie JDK
JFR for profiling
Dostępne
Widely available since JDK 9/11 (open-sourced in 11)
Jak to działa
Java Flight Recorder (JFR) is a low-overhead profiling tool built into the JVM. It captures events for CPU, memory, GC, I/O, threads, and custom events with minimal performance impact (~1%).
Powiązana dokumentacja