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 armintermediary net/minecraft/class_6528named net/minecraft/util/profiling/jfr/sample/PacketSampleofficial aintermediary comp_41named timeofficial bintermediary comp_42named packetNameofficial cintermediary comp_43named bytes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thebytesrecord component.private final StringThe field for thepacketNamerecord component.private final InstantThe field for thetimerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbytes()Returns the value of thebytesrecord component.final booleanIndicates whether some other object is "equal to" this one.static PacketSamplefromEvent(RecordedEvent event) getTime()final inthashCode()Returns a hash code value for this object.Returns the value of thepacketNamerecord component.time()Returns the value of thetimerecord component.static PacketSample.StatisticstoStatistics(Duration duration, List<PacketSample> samples) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
time
The field for thetimerecord component. -
packetName
The field for thepacketNamerecord component. -
bytes
private final int bytesThe field for thebytesrecord component.
-
-
Constructor Details
-
PacketSample
-
-
Method Details
-
fromEvent
- Mappings:
Namespace Name Mixin selector official aLarm;a(Ljdk/jfr/consumer/RecordedEvent;)Larm;intermediary method_38049Lnet/minecraft/class_6528;method_38049(Ljdk/jfr/consumer/RecordedEvent;)Lnet/minecraft/class_6528;named fromEventLnet/minecraft/util/profiling/jfr/sample/PacketSample;fromEvent(Ljdk/jfr/consumer/RecordedEvent;)Lnet/minecraft/util/profiling/jfr/sample/PacketSample;
-
toStatistics
- Mappings:
Namespace Name Mixin selector official aLarm;a(Ljava/time/Duration;Ljava/util/List;)Larm$a;intermediary method_38047Lnet/minecraft/class_6528;method_38047(Ljava/time/Duration;Ljava/util/List;)Lnet/minecraft/class_6528$class_6529;named toStatisticsLnet/minecraft/util/profiling/jfr/sample/PacketSample;toStatistics(Ljava/time/Duration;Ljava/util/List;)Lnet/minecraft/util/profiling/jfr/sample/PacketSample$Statistics;
-
getTime
- Specified by:
getTimein interfaceTimedSample- Mappings:
Namespace Name Mixin selector official aLarp;a()Ljava/time/Instant;intermediary method_38045Lnet/minecraft/class_6533;method_38045()Ljava/time/Instant;named getTimeLnet/minecraft/util/profiling/jfr/sample/TimedSample;getTime()Ljava/time/Instant;
-
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 '=='. -
time
Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
packetName
Returns the value of thepacketNamerecord component.- Returns:
- the value of the
packetNamerecord component
-
bytes
public int bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-