Class JvmGcMetrics
- All Implemented Interfaces:
MeterBinder,AutoCloseable
This provides metrics for OpenJDK garbage collectors (serial, parallel, G1, Shenandoah, ZGC), OpenJ9 garbage collectors (gencon, balanced, opthruput, optavgpause, metronome) and for Azul Prime's (formerly Zing) C4 GC (formerly GPGC).
WARNING: Older versions of Azul Prime (Zing) did not report timing information about pauses and cycles correctly (duration of GC pauses and duration of the concurrent part of the GC which runs in parallel to application threads and is not stopping the application). See the release notes and JDK-8265136. If you want better accuracy, please make sure that you use a newer version and the new metrics are enabled.
Note: the close() method should be called when the application shuts down to
clean up the GC notification listeners this binder registers on the JVM's
GarbageCollectorMXBeans.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JvmGcMetrics
public JvmGcMetrics() -
JvmGcMetrics
-
-
Method Details
-
bindTo
- Specified by:
bindToin interfaceMeterBinder
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-