import { AgentStatus } from 'agentkeepalive';
import { ManagedResource } from '@splunkdlt/managed-resource';
export interface Stats {
    [k: string]: number | Stats;
}
export interface StatsSource<S extends Stats> {
    flushStats(): S;
}
export declare type FlattenedStats = Array<{
    name: string;
    value: number;
}>;
export declare function flatStats(m: Stats, prefix?: string): FlattenedStats;
export declare class InternalStatsCollector implements ManagedResource {
    config: {
        collect: boolean;
        collectInterval: number;
        basePrefix?: string;
    };
    private readonly sources;
    private active;
    private collectTimer;
    constructor(config: {
        collect: boolean;
        collectInterval: number;
        basePrefix?: string;
    });
    addSource<S extends Stats>(source: StatsSource<S>, prefix?: string): void;
    collectStats(): FlattenedStats;
    private next;
    start(): void;
    shutdown(): Promise<void>;
}
export declare function httpClientStats(agentStatus: AgentStatus): Stats;
export declare class AggregateMetric {
    private measurements;
    push(measurement: number): void;
    flush(prefix: string, enabledAggregations?: {
        min?: boolean;
        max?: boolean;
        count?: boolean;
        sum?: boolean;
        avg?: boolean;
        p80?: boolean;
        p90?: boolean;
        p95?: boolean;
        p99?: boolean;
    }): Stats;
}
