Contents
Class PacketStatsRecorderImpl
java.lang.Object
com.hypixel.hytale.server.core.io.PacketStatsRecorderImpl
- All Implemented Interfaces:
PacketStatsRecorder
Server-side implementation of
PacketStatsRecorder that tracks
per-packet statistics including both compressed and uncompressed sizes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPer-packet statistics entry tracking both send and receive stats with compressed and uncompressed sizes.Nested classes/interfaces inherited from interface PacketStatsRecorder
PacketStatsRecorder.RecentStats -
Field Summary
FieldsFields inherited from interface PacketStatsRecorder
CHANNEL_KEY, NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEntry(int packetId) Get the stats entry for a specific packet ID.voidrecordReceive(int packetId, int uncompressedSize, int compressedSize) Record statistics for an inbound packet.voidrecordSend(int packetId, int uncompressedSize, int compressedSize) Record statistics for an outbound packet.
-
Field Details
-
METRICS_REGISTRY
-
-
Constructor Details
-
PacketStatsRecorderImpl
public PacketStatsRecorderImpl()
-
-
Method Details
-
recordSend
public void recordSend(int packetId, int uncompressedSize, int compressedSize) Description copied from interface:PacketStatsRecorderRecord statistics for an outbound packet.- Specified by:
recordSendin interfacePacketStatsRecorder- Parameters:
packetId- the packet IDuncompressedSize- the serialized size before compressioncompressedSize- the wire size after compression (same as uncompressed if not compressed)
-
recordReceive
public void recordReceive(int packetId, int uncompressedSize, int compressedSize) Description copied from interface:PacketStatsRecorderRecord statistics for an inbound packet.- Specified by:
recordReceivein interfacePacketStatsRecorder- Parameters:
packetId- the packet IDuncompressedSize- the decompressed payload sizecompressedSize- the wire size before decompression (same as uncompressed if not compressed)
-
getEntry
Description copied from interface:PacketStatsRecorderGet the stats entry for a specific packet ID.- Specified by:
getEntryin interfacePacketStatsRecorder
-