Record Class PacketSample

java.lang.Object
java.lang.Record
net.minecraft.util.profiling.jfr.sample.PacketSample
Record Components:
time -
packetName -
bytes -
All Implemented Interfaces:
TimedSample

public record PacketSample(Instant time, String packetName, int bytes) extends Record implements TimedSample
Mappings:
Namespace Name
official arm
intermediary net/minecraft/class_6528
named net/minecraft/util/profiling/jfr/sample/PacketSample
official a
intermediary comp_41
named time
official b
intermediary comp_42
named packetName
official c
intermediary comp_43
named bytes
  • Field Details

    • time

      private final Instant time
      The field for the time record component.
    • packetName

      private final String packetName
      The field for the packetName record component.
    • bytes

      private final int bytes
      The field for the bytes record component.
  • Constructor Details

    • PacketSample

      public PacketSample(Instant instant, String string, int int2)
  • Method Details

    • fromEvent

      public static PacketSample fromEvent(RecordedEvent event)
      Mappings:
      Namespace Name Mixin selector
      official a Larm;a(Ljdk/jfr/consumer/RecordedEvent;)Larm;
      intermediary method_38049 Lnet/minecraft/class_6528;method_38049(Ljdk/jfr/consumer/RecordedEvent;)Lnet/minecraft/class_6528;
      named fromEvent Lnet/minecraft/util/profiling/jfr/sample/PacketSample;fromEvent(Ljdk/jfr/consumer/RecordedEvent;)Lnet/minecraft/util/profiling/jfr/sample/PacketSample;
    • toStatistics

      public static PacketSample.Statistics toStatistics(Duration duration, List<PacketSample> samples)
      Mappings:
      Namespace Name Mixin selector
      official a Larm;a(Ljava/time/Duration;Ljava/util/List;)Larm$a;
      intermediary method_38047 Lnet/minecraft/class_6528;method_38047(Ljava/time/Duration;Ljava/util/List;)Lnet/minecraft/class_6528$class_6529;
      named toStatistics Lnet/minecraft/util/profiling/jfr/sample/PacketSample;toStatistics(Ljava/time/Duration;Ljava/util/List;)Lnet/minecraft/util/profiling/jfr/sample/PacketSample$Statistics;
    • getTime

      public Instant getTime()
      Specified by:
      getTime in interface TimedSample
      Mappings:
      Namespace Name Mixin selector
      official a Larp;a()Ljava/time/Instant;
      intermediary method_38045 Lnet/minecraft/class_6533;method_38045()Ljava/time/Instant;
      named getTime Lnet/minecraft/util/profiling/jfr/sample/TimedSample;getTime()Ljava/time/Instant;
    • 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.
    • time

      public Instant time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • packetName

      public String packetName()
      Returns the value of the packetName record component.
      Returns:
      the value of the packetName record component
    • bytes

      public int bytes()
      Returns the value of the bytes record component.
      Returns:
      the value of the bytes record component