Package com.helix.profiler.gc
Record Class GcEvent
java.lang.Object
java.lang.Record
com.helix.profiler.gc.GcEvent
- Record Components:
timestampMs- Timestamp in milliseconds relative to JVM launchgcId- GC collection IDtype- GC type (e.g. "Pause Young (Normal)", "Pause Full")cause- GC cause / phase (e.g. "G1 Evacuation Pause", "System.gc()")heapBeforeKb- Heap memory used before collection in KBheapAfterKb- Heap memory used after collection in KBheapTotalKb- Total committed heap capacity in KBpauseTimeMs- Duration of GC pause in millisecondsisFullGc- True if this collection was a Full GCtimestamp- Instant when event was parsed
public record GcEvent(long timestampMs, int gcId, String type, String cause, long heapBeforeKb, long heapAfterKb, long heapTotalKb, double pauseTimeMs, boolean isFullGc, Instant timestamp)
extends Record
Record representing a Garbage Collection event parsed from JDK Unified GC Logging (-Xlog:gc*).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.intgcId()Returns the value of thegcIdrecord component.longCalculates memory reclaimed during this collection cycle in KB.final inthashCode()Returns a hash code value for this object.longReturns the value of theheapAfterKbrecord component.longReturns the value of theheapBeforeKbrecord component.longReturns the value of theheapTotalKbrecord component.booleanisFullGc()Returns the value of theisFullGcrecord component.doubleReturns the value of thepauseTimeMsrecord component.Returns the value of thetimestamprecord component.longReturns the value of thetimestampMsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
GcEvent
public GcEvent(long timestampMs, int gcId, String type, String cause, long heapBeforeKb, long heapAfterKb, long heapTotalKb, double pauseTimeMs, boolean isFullGc, Instant timestamp) Creates an instance of aGcEventrecord class.- Parameters:
timestampMs- the value for thetimestampMsrecord componentgcId- the value for thegcIdrecord componenttype- the value for thetyperecord componentcause- the value for thecauserecord componentheapBeforeKb- the value for theheapBeforeKbrecord componentheapAfterKb- the value for theheapAfterKbrecord componentheapTotalKb- the value for theheapTotalKbrecord componentpauseTimeMs- the value for thepauseTimeMsrecord componentisFullGc- the value for theisFullGcrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
getReclaimedKb
public long getReclaimedKb()Calculates memory reclaimed during this collection cycle in KB. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
timestampMs
public long timestampMs()Returns the value of thetimestampMsrecord component.- Returns:
- the value of the
timestampMsrecord component
-
gcId
public int gcId()Returns the value of thegcIdrecord component.- Returns:
- the value of the
gcIdrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-
heapBeforeKb
public long heapBeforeKb()Returns the value of theheapBeforeKbrecord component.- Returns:
- the value of the
heapBeforeKbrecord component
-
heapAfterKb
public long heapAfterKb()Returns the value of theheapAfterKbrecord component.- Returns:
- the value of the
heapAfterKbrecord component
-
heapTotalKb
public long heapTotalKb()Returns the value of theheapTotalKbrecord component.- Returns:
- the value of the
heapTotalKbrecord component
-
pauseTimeMs
public double pauseTimeMs()Returns the value of thepauseTimeMsrecord component.- Returns:
- the value of the
pauseTimeMsrecord component
-
isFullGc
public boolean isFullGc()Returns the value of theisFullGcrecord component.- Returns:
- the value of the
isFullGcrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-