Record Class ThreadAllocationStat

java.lang.Object
java.lang.Record
net.minecraft.util.profiling.jfr.stats.ThreadAllocationStat

public record ThreadAllocationStat(Instant timestamp, String threadName, long totalBytes) extends Record
  • Field Details

    • timestamp

      private final Instant timestamp
      The field for the timestamp record component.
    • threadName

      private final String threadName
      The field for the threadName record component.
    • totalBytes

      private final long totalBytes
      The field for the totalBytes record component.
    • UNKNOWN_THREAD

      private static final String UNKNOWN_THREAD
      See Also:
  • Constructor Details

    • ThreadAllocationStat

      public ThreadAllocationStat(Instant timestamp, String threadName, long totalBytes)
      Creates an instance of a ThreadAllocationStat record class.
      Parameters:
      timestamp - the value for the timestamp record component
      threadName - the value for the threadName record component
      totalBytes - the value for the totalBytes record component
  • Method Details

    • from

      public static ThreadAllocationStat from(RecordedEvent p_185804_)
    • summary

      public static ThreadAllocationStat.Summary summary(List<ThreadAllocationStat> p_185798_)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • threadName

      public String threadName()
      Returns the value of the threadName record component.
      Returns:
      the value of the threadName record component
    • totalBytes

      public long totalBytes()
      Returns the value of the totalBytes record component.
      Returns:
      the value of the totalBytes record component