// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.protocol.io;

import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import io.netty.util.AttributeKey;

public interface PacketStatsRecorder
{
    public static final AttributeKey<PacketStatsRecorder> CHANNEL_KEY = AttributeKey.valueOf("PacketStatsRecorder");
    public static final PacketStatsRecorder NOOP = new NoopPacketStatsRecorder();
    
    void recordSend(final int p0, final int p1, final int p2);
    
    void recordReceive(final int p0, final int p1, final int p2);
    
    @Nonnull
    PacketStatsEntry getEntry(final int p0);
    
    record RecentStats(int count, long uncompressedTotal, long compressedTotal, int uncompressedMin, int uncompressedMax, int compressedMin, int compressedMax) {
        public static final RecentStats EMPTY;
        
        static {
            EMPTY = new RecentStats(0, 0L, 0L, 0, 0, 0, 0);
        }
    }
    
    public interface PacketStatsEntry
    {
        public static final 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();
    }
}
