Record Class GcHeapStat
java.lang.Object
java.lang.Record
net.minecraft.util.profiling.jfr.stats.GcHeapStat
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
(package private) static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate final long
The field for theheapUsed
record component.private final Instant
The field for thetimestamp
record component.private final GcHeapStat.Timing
The field for thetiming
record component. -
Constructor Summary
ConstructorDescriptionGcHeapStat
(Instant timestamp, long heapUsed, GcHeapStat.Timing timing) Creates an instance of aGcHeapStat
record class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static double
calculateAllocationRatePerSecond
(List<GcHeapStat> p_185696_) final boolean
Indicates whether some other object is "equal to" this one.static GcHeapStat
from
(RecordedEvent p_185698_) final int
hashCode()
Returns a hash code value for this object.long
heapUsed()
Returns the value of theheapUsed
record component.static GcHeapStat.Summary
summary
(Duration p_185691_, List<GcHeapStat> p_185692_, Duration p_185693_, int p_185694_) Returns the value of thetimestamp
record component.timing()
Returns the value of thetiming
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
timestamp
The field for thetimestamp
record component. -
heapUsed
private final long heapUsedThe field for theheapUsed
record component. -
timing
The field for thetiming
record component.
-
-
Constructor Details
-
GcHeapStat
Creates an instance of aGcHeapStat
record class.- Parameters:
timestamp
- the value for thetimestamp
record componentheapUsed
- the value for theheapUsed
record componenttiming
- the value for thetiming
record component
-
-
Method Details
-
from
-
summary
public static GcHeapStat.Summary summary(Duration p_185691_, List<GcHeapStat> p_185692_, Duration p_185693_, int p_185694_) -
calculateAllocationRatePerSecond
-
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 '=='. -
timestamp
Returns the value of thetimestamp
record component.- Returns:
- the value of the
timestamp
record component
-
heapUsed
public long heapUsed()Returns the value of theheapUsed
record component.- Returns:
- the value of the
heapUsed
record component
-
timing
Returns the value of thetiming
record component.- Returns:
- the value of the
timing
record component
-