Class GarbageCollectionStatusProvider

java.lang.Object
com.github.jpmsilva.jsystemd.GarbageCollectionStatusProvider
All Implemented Interfaces:
StatusProvider

public class GarbageCollectionStatusProvider extends Object implements StatusProvider
Implementation of StatusProvider that provides the garbage collection pauses since the status was last read, or since this provider was created: how many there were, and the share of the time they took, such as GC: 12 pauses, 0.4% of time. A share that keeps growing means the application spends more and more of its time collecting garbage, usually as it runs out of heap.

Only pauses are counted. The concurrent collectors, such as ZGC and Shenandoah, also report the time of their concurrent cycles, which run alongside the application rather than pausing it, and are left out.

Author:
Joao Silva
  • Constructor Details

    • GarbageCollectionStatusProvider

      public GarbageCollectionStatusProvider()
      Create a new GarbageCollectionStatusProvider, which reports the pauses since it was created on the first read.
  • Method Details

    • status

      public String status()
      Description copied from interface: StatusProvider
      Exposes status information to send to systemd.
      Specified by:
      status in interface StatusProvider
      Returns:
      the string message to add to the service status