package com.hypixel.hytale.protocol.io;
import io.netty.util.AttributeKey;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
public interface PacketStatsRecorder {
AttributeKey<PacketStatsRecorder> CHANNEL_KEY = AttributeKey.<PacketStatsRecorder>valueOf("PacketStatsRecorder");
PacketStatsRecorder NOOP = new NoopPacketStatsRecorder();
void recordSend(int var1, int var2, int var3);
void recordReceive(int var1, int var2, int var3);
@Nonnull
PacketStatsEntry getEntry(int var1);
public static record RecentStats(int count, long uncompressedTotal, long compressedTotal, int uncompressedMin, int uncompressedMax, int compressedMin, int compressedMax) {
public static final RecentStats EMPTY = new RecentStats(0, 0L, 0L, 0, 0, 0, 0);
}
public interface PacketStatsEntry {
int RECENT_SECONDS = 30;
int getPacketId();
@Nullable
String getName();
boolean hasData();
int getSentCount();
long getSentUncompressedTotal();
long getSentCompressedTotal();
long getSentUncompressedMin();
long getSentUncompressedMax();
long getSentCompressedMin();
long getSentCompressedMax();
double getSentUncompressedAvg();
double getSentCompressedAvg();
@Nonnull
RecentStats getSentRecently();
int getReceivedCount();
long getReceivedUncompressedTotal();
long getReceivedCompressedTotal();
long getReceivedUncompressedMin();
long getReceivedUncompressedMax();
long getReceivedCompressedMin();
long getReceivedCompressedMax();
double getReceivedUncompressedAvg();
double getReceivedCompressedAvg();
@Nonnull
RecentStats getReceivedRecently();
}
}