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
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The field for thebytes
record component.private final String
The field for thepacketName
record component.private final Instant
The field for thetime
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
bytes()
Returns the value of thebytes
record component.final boolean
Indicates whether some other object is "equal to" this one.static PacketSample
fromEvent
(RecordedEvent event) getTime()
final int
hashCode()
Returns a hash code value for this object.Returns the value of thepacketName
record component.time()
Returns the value of thetime
record component.static PacketSample.Statistics
toStatistics
(Duration duration, List<PacketSample> samples) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
time
The field for thetime
record component. -
packetName
The field for thepacketName
record component. -
bytes
private final int bytesThe field for thebytes
record component.
-
-
Constructor Details
-
PacketSample
-
-
Method Details
-
fromEvent
- 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
- 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
- Specified by:
getTime
in interfaceTimedSample
- 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
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 thetime
record component.- Returns:
- the value of the
time
record component
-
packetName
Returns the value of thepacketName
record component.- Returns:
- the value of the
packetName
record component
-
bytes
public int bytes()Returns the value of thebytes
record component.- Returns:
- the value of the
bytes
record component
-