Class PacketStatsRecorderImpl.PacketStatsEntry
java.lang.Object
com.hypixel.hytale.server.core.io.PacketStatsRecorderImpl.PacketStatsEntry
- All Implemented Interfaces:
PacketStatsRecorder.PacketStatsEntry
- Enclosing class:
PacketStatsRecorderImpl
public static class PacketStatsRecorderImpl.PacketStatsEntry
extends Object
implements PacketStatsRecorder.PacketStatsEntry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MetricsRegistry<PacketStatsRecorderImpl.PacketStatsEntry> private final intprivate final AverageCollectorprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicIntegerprivate final Queue<PacketStatsRecorderImpl.PacketStatsEntry.SizeRecord> private final AverageCollectorprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AverageCollectorprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongprivate final AtomicIntegerprivate final Queue<PacketStatsRecorderImpl.PacketStatsEntry.SizeRecord> private final AverageCollectorprivate final AtomicLongprivate final AtomicLongprivate final AtomicLongFields inherited from interface com.hypixel.hytale.protocol.io.PacketStatsRecorder.PacketStatsEntry
RECENT_SECONDS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate PacketStatsRecorder.RecentStatsgetName()intdoublelonglonglongintdoublelonglonglongdoublelonglonglongintdoublelonglonglongbooleanhasData()private voidpruneOld(Queue<PacketStatsRecorderImpl.PacketStatsEntry.SizeRecord> queue, long now) (package private) voidrecordReceive(int uncompressedSize, int compressedSize) (package private) voidrecordSend(int uncompressedSize, int compressedSize) voidreset()
-
Field Details
-
METRICS_REGISTRY
-
packetId
private final int packetId -
sentCount
-
sentUncompressedTotal
-
sentCompressedTotal
-
sentUncompressedMin
-
sentUncompressedMax
-
sentCompressedMin
-
sentCompressedMax
-
sentUncompressedAvg
-
sentCompressedAvg
-
sentRecently
-
receivedCount
-
receivedUncompressedTotal
-
receivedCompressedTotal
-
receivedUncompressedMin
-
receivedUncompressedMax
-
receivedCompressedMin
-
receivedCompressedMax
-
receivedUncompressedAvg
-
receivedCompressedAvg
-
receivedRecently
-
-
Constructor Details
-
PacketStatsEntry
public PacketStatsEntry(int packetId)
-
-
Method Details
-
recordSend
void recordSend(int uncompressedSize, int compressedSize) -
recordReceive
void recordReceive(int uncompressedSize, int compressedSize) -
pruneOld
-
hasData
public boolean hasData()- Specified by:
hasDatain interfacePacketStatsRecorder.PacketStatsEntry
-
getPacketId
public int getPacketId()- Specified by:
getPacketIdin interfacePacketStatsRecorder.PacketStatsEntry
-
getName
- Specified by:
getNamein interfacePacketStatsRecorder.PacketStatsEntry
-
getSentCount
public int getSentCount()- Specified by:
getSentCountin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentUncompressedTotal
public long getSentUncompressedTotal()- Specified by:
getSentUncompressedTotalin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentCompressedTotal
public long getSentCompressedTotal()- Specified by:
getSentCompressedTotalin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentUncompressedMin
public long getSentUncompressedMin()- Specified by:
getSentUncompressedMinin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentUncompressedMax
public long getSentUncompressedMax()- Specified by:
getSentUncompressedMaxin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentCompressedMin
public long getSentCompressedMin()- Specified by:
getSentCompressedMinin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentCompressedMax
public long getSentCompressedMax()- Specified by:
getSentCompressedMaxin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentUncompressedAvg
public double getSentUncompressedAvg()- Specified by:
getSentUncompressedAvgin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentCompressedAvg
public double getSentCompressedAvg()- Specified by:
getSentCompressedAvgin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedCount
public int getReceivedCount()- Specified by:
getReceivedCountin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedUncompressedTotal
public long getReceivedUncompressedTotal()- Specified by:
getReceivedUncompressedTotalin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedCompressedTotal
public long getReceivedCompressedTotal()- Specified by:
getReceivedCompressedTotalin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedUncompressedMin
public long getReceivedUncompressedMin()- Specified by:
getReceivedUncompressedMinin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedUncompressedMax
public long getReceivedUncompressedMax()- Specified by:
getReceivedUncompressedMaxin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedCompressedMin
public long getReceivedCompressedMin()- Specified by:
getReceivedCompressedMinin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedCompressedMax
public long getReceivedCompressedMax()- Specified by:
getReceivedCompressedMaxin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedUncompressedAvg
public double getReceivedUncompressedAvg()- Specified by:
getReceivedUncompressedAvgin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedCompressedAvg
public double getReceivedCompressedAvg()- Specified by:
getReceivedCompressedAvgin interfacePacketStatsRecorder.PacketStatsEntry
-
getSentRecently
- Specified by:
getSentRecentlyin interfacePacketStatsRecorder.PacketStatsEntry
-
getReceivedRecently
- Specified by:
getReceivedRecentlyin interfacePacketStatsRecorder.PacketStatsEntry
-
computeRecentStats
private PacketStatsRecorder.RecentStats computeRecentStats(Queue<PacketStatsRecorderImpl.PacketStatsEntry.SizeRecord> queue) -
reset
public void reset()
-