PacketStatsRecorderImpl

public class PacketStatsRecorderImpl implements PacketStatsRecorder

Class PacketStatsRecorderImpl. Provides packetstatsrecorderimpl functionality for the Hytale server.

java.lang.Object > PacketStatsRecorderImpl

Field Summary

entries

final ArrayList entries

Field entries.

entry

final PacketStatsEntry entry

Field entry.

now

final long now

Field now.

cutoff

final long cutoff

Field cutoff.

info

final PacketRegistry.PacketInfo info

Field info.

Method Detail

PacketStatsRecorderImpl

public public PacketStatsRecorderImpl ()

Method PacketStatsRecorderImpl.

recordSend

public void recordSend (final int packetId, final int uncompressedSize, final int compressedSize)

Method recordSend.

Parameters:
final int packetId
final int uncompressedSize
final int compressedSize

recordReceive

public void recordReceive (final int packetId, final int uncompressedSize, final int compressedSize)

Method recordReceive.

Parameters:
final int packetId
final int uncompressedSize
final int compressedSize

getEntry

public PacketStatsEntry getEntry (final int packetId)

Method getEntry.

Parameters:
final int packetId

SizeRecord

public new SizeRecord (now, uncompressedSize, compressedSize)

Method SizeRecord.

Parameters:
now now
uncompressedSize uncompressedSize
compressedSize compressedSize

pruneOld

private void pruneOld (final Queue queue, final long now)

Method pruneOld.

Parameters:
final Queue queue
final long now

hasData

public boolean hasData ()

Method hasData.

getPacketId

public int getPacketId ()

Method getPacketId.

getName

public String getName ()

Method getName.

getSentCount

public int getSentCount ()

Method getSentCount.

getSentUncompressedTotal

public long getSentUncompressedTotal ()

Method getSentUncompressedTotal.

getSentCompressedTotal

public long getSentCompressedTotal ()

Method getSentCompressedTotal.

getSentUncompressedMin

public long getSentUncompressedMin ()

Method getSentUncompressedMin.

getSentUncompressedMax

public long getSentUncompressedMax ()

Method getSentUncompressedMax.

getSentCompressedMin

public long getSentCompressedMin ()

Method getSentCompressedMin.

getSentCompressedMax

public long getSentCompressedMax ()

Method getSentCompressedMax.

getSentUncompressedAvg

public double getSentUncompressedAvg ()

Method getSentUncompressedAvg.

getSentCompressedAvg

public double getSentCompressedAvg ()

Method getSentCompressedAvg.

getReceivedCount

public int getReceivedCount ()

Method getReceivedCount.

getReceivedUncompressedTotal

public long getReceivedUncompressedTotal ()

Method getReceivedUncompressedTotal.

getReceivedCompressedTotal

public long getReceivedCompressedTotal ()

Method getReceivedCompressedTotal.

getReceivedUncompressedMin

public long getReceivedUncompressedMin ()

Method getReceivedUncompressedMin.

getReceivedUncompressedMax

public long getReceivedUncompressedMax ()

Method getReceivedUncompressedMax.

getReceivedCompressedMin

public long getReceivedCompressedMin ()

Method getReceivedCompressedMin.

getReceivedCompressedMax

public long getReceivedCompressedMax ()

Method getReceivedCompressedMax.

getReceivedUncompressedAvg

public double getReceivedUncompressedAvg ()

Method getReceivedUncompressedAvg.

getReceivedCompressedAvg

public double getReceivedCompressedAvg ()

Method getReceivedCompressedAvg.

getSentRecently

public RecentStats getSentRecently ()

Method getSentRecently.

getReceivedRecently

public RecentStats getReceivedRecently ()

Method getReceivedRecently.

computeRecentStats

private RecentStats computeRecentStats (final Queue queue)

Method computeRecentStats.

Parameters:
final Queue queue

reset

public void reset ()

Method reset.