Class PacketStatsRecorderImpl

java.lang.Object
com.hypixel.hytale.server.core.io.PacketStatsRecorderImpl
All Implemented Interfaces:
PacketStatsRecorder

public class PacketStatsRecorderImpl extends Object implements PacketStatsRecorder
Server-side implementation of PacketStatsRecorder that tracks per-packet statistics including both compressed and uncompressed sizes.
  • Field Details

  • Constructor Details

    • PacketStatsRecorderImpl

      public PacketStatsRecorderImpl()
  • Method Details

    • recordSend

      public void recordSend(int packetId, int uncompressedSize, int compressedSize)
      Description copied from interface: PacketStatsRecorder
      Record statistics for an outbound packet.
      Specified by:
      recordSend in interface PacketStatsRecorder
      Parameters:
      packetId - the packet ID
      uncompressedSize - the serialized size before compression
      compressedSize - 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: PacketStatsRecorder
      Record statistics for an inbound packet.
      Specified by:
      recordReceive in interface PacketStatsRecorder
      Parameters:
      packetId - the packet ID
      uncompressedSize - the decompressed payload size
      compressedSize - the wire size before decompression (same as uncompressed if not compressed)
    • getEntry

      @Nonnull public PacketStatsRecorderImpl.PacketStatsEntry getEntry(int packetId)
      Description copied from interface: PacketStatsRecorder
      Get the stats entry for a specific packet ID.
      Specified by:
      getEntry in interface PacketStatsRecorder