import { OperationKind } from "./api/Event";
type OperationCompressedTimings = {
    averageInMS: number;
    percentiles: Record<string, number>;
    compressedAt: number;
};
type OperationStats = {
    kind: OperationKind;
    withoutContext: number;
    total: number;
    durations: number[];
    compressedTimings: OperationCompressedTimings[];
    interceptorThrewError: number;
    attacksDetected: {
        total: number;
        blocked: number;
    };
};
type OperationStatsWithoutTimings = Omit<OperationStats, "durations">;
type UserAgentBotKey = string;
type IPListKey = string;
export declare class InspectionStatistics {
    private startedAt;
    private operations;
    private readonly maxPerfSamplesInMemory;
    private readonly maxCompressedStatsInMemory;
    private requests;
    private userAgents;
    private ipAddresses;
    constructor({ maxPerfSamplesInMemory, maxCompressedStatsInMemory, }: {
        maxPerfSamplesInMemory: number;
        maxCompressedStatsInMemory: number;
    });
    hasCompressedStats(): boolean;
    isEmpty(): boolean;
    reset(): void;
    getStats(): {
        operations: Record<string, OperationStatsWithoutTimings>;
        startedAt: number;
        requests: {
            total: number;
            aborted: number;
            rateLimited: number;
            attacksDetected: {
                total: number;
                blocked: number;
            };
            attackWaves: {
                total: number;
                blocked: number;
            };
        };
        userAgents: {
            breakdown: Record<string, number>;
        };
        ipAddresses: {
            breakdown: Record<string, number>;
        };
    };
    private ensureOperationStats;
    private compressPerfSamples;
    interceptorThrewError(operation: string, kind: OperationKind): void;
    onDetectedAttack({ blocked }: {
        blocked: boolean;
    }): void;
    onIPAddressMatches(matches: IPListKey[]): void;
    onUserAgentMatches(matches: UserAgentBotKey[]): void;
    onAbortedRequest(): void;
    onRequest(): void;
    onRateLimitedRequest(): void;
    onAttackWaveDetected(): void;
    onInspectedCall({ operation, kind, blocked, attackDetected, durationInMs, withoutContext, }: {
        operation: string;
        kind: OperationKind;
        durationInMs: number;
        attackDetected: boolean;
        blocked: boolean;
        withoutContext: boolean;
    }): void;
    forceCompress(): void;
}
export {};
