export interface LatencyMetrics {
    count: number;
    sum: number;
    min: number;
    max: number;
    avg: number;
    p50: number;
    p95: number;
    p99: number;
    p999: number;
}
export interface SystemHealth {
    status: 'healthy' | 'degraded' | 'unhealthy';
    uptime: number;
    version: string;
    timestamp: number;
    checks: HealthCheck[];
}
export interface HealthCheck {
    name: string;
    status: 'pass' | 'fail' | 'warn';
    message: string;
    duration: number;
    timestamp: number;
}
export interface ModuleSystemStats {
    modulesLoaded: number;
    modulesInCache: number;
    cacheHitRate: number;
    cacheMemoryUsage: number;
    cacheMemoryLimit: number;
    loadLatency: LatencyMetrics;
    compileLatency: LatencyMetrics;
    bundleLatency: LatencyMetrics;
    loadErrors: number;
    compileErrors: number;
    bundleErrors: number;
    circuitBreakerTrips: number;
    processMemoryUsage: {
        rss: number;
        heapTotal: number;
        heapUsed: number;
        external: number;
        arrayBuffers: number;
    };
    cpuUsage: number;
    systemLoad: number[];
    requestCount: number;
    errorRate: number;
    uptime: number;
}
/**
 * Latency recorder with percentile calculation
 */
export declare class LatencyRecorder {
    private measurements;
    private totalCount;
    private totalSum;
    private minValue;
    private maxValue;
    private readonly maxSamples;
    record(latencyMs: number): void;
    getMetrics(): LatencyMetrics;
    private percentile;
    reset(): void;
}
/**
 * Counter for tracking events and errors
 */
export declare class Counter {
    private count;
    increment(delta?: number): void;
    getValue(): number;
    reset(): void;
}
/**
 * Production metrics collector and manager
 */
export declare class ModuleSystemMetrics {
    readonly loadLatency: LatencyRecorder;
    readonly compileLatency: LatencyRecorder;
    readonly bundleLatency: LatencyRecorder;
    readonly loadErrors: Counter;
    readonly compileErrors: Counter;
    readonly bundleErrors: Counter;
    readonly circuitBreakerTrips: Counter;
    readonly requestCount: Counter;
    private startTime;
    private lastCpuUsage;
    private lastCpuTime;
    /**
     * Record the latency of an async operation
     */
    recordAsync<T>(recorder: LatencyRecorder, operation: () => Promise<T>): Promise<T>;
    /**
     * Record the latency of a sync operation
     */
    recordSync<T>(recorder: LatencyRecorder, operation: () => T): T;
    /**
     * Calculate CPU usage percentage
     */
    private calculateCpuUsage;
    /**
     * Get comprehensive system statistics
     */
    getStats(cacheSize: number, cacheMemoryUsage: number, cacheMemoryLimit: number): ModuleSystemStats;
    /**
     * Perform health checks
     */
    performHealthChecks(cacheSize: number, cacheMemoryLimit: number): Promise<SystemHealth>;
    private checkMemoryHealth;
    private checkCpuHealth;
    private checkCacheHealth;
    private checkErrorRate;
    /**
     * Reset all metrics
     */
    reset(): void;
}
//# sourceMappingURL=metrics.d.ts.map