/**
 * Worker Metrics Manager
 * Time-series metrics persistence with Redis Sorted Sets
 * Sealed namespace for immutability
 */
import { type RedisConfig } from '../../../src/index.js';
export type MetricType = 'processed' | 'errors' | 'duration' | 'memory' | 'cpu' | 'queue-size' | 'active-jobs' | 'waiting-jobs' | 'delayed-jobs' | 'failed-jobs' | 'completed-jobs';
export type MetricGranularity = 'hourly' | 'daily' | 'monthly';
export type MetricPoint = {
    timestamp: Date;
    value: number;
    metadata?: Record<string, unknown>;
};
export type MetricEntry = {
    workerName: string;
    metricType: MetricType;
    granularity: MetricGranularity;
    points: ReadonlyArray<MetricPoint>;
};
export type MetricQueryOptions = {
    workerName: string;
    metricType: MetricType;
    granularity: MetricGranularity;
    startDate?: Date;
    endDate?: Date;
    limit?: number;
};
export type AggregatedMetrics = {
    workerName: string;
    metricType: MetricType;
    period: {
        start: Date;
        end: Date;
    };
    total: number;
    average: number;
    min: number;
    max: number;
    count: number;
};
export type WorkerHealthScore = {
    workerName: string;
    timestamp: Date;
    score: number;
    factors: {
        errorRate: number;
        throughput: number;
        latency: number;
        resourceUsage: number;
    };
    status: 'healthy' | 'degraded' | 'unhealthy';
};
/**
 * Worker Metrics Manager - Sealed namespace
 */
declare const WorkerMetrics: Readonly<{
    /**
     * Initialize the metrics manager with Redis connection
     */
    initialize(config: RedisConfig): void;
    /**
     * Record a metric point
     */
    record(workerName: string, metricType: MetricType, value: number, metadata?: Record<string, unknown>): Promise<void>;
    /**
     * Record multiple metrics at once (batch operation)
     */
    recordBatch(workerName: string, metrics: Array<{
        metricType: MetricType;
        value: number;
        metadata?: Record<string, unknown>;
    }>): Promise<void>;
    /**
     * Query metrics for a time range
     */
    query(options: MetricQueryOptions): Promise<MetricEntry>;
    /**
     * Get aggregated metrics for a time range
     */
    aggregate(options: MetricQueryOptions): Promise<AggregatedMetrics>;
    aggregateBatch(optionsList: MetricQueryOptions[]): Promise<AggregatedMetrics[]>;
    /**
     * Calculate and store health score
     */
    calculateHealth(workerName: string): Promise<WorkerHealthScore>;
    /**
     * Get recent health scores
     */
    getHealthHistory(workerName: string, hours?: number): Promise<ReadonlyArray<WorkerHealthScore>>;
    /**
     * Get latest health score
     */
    getLatestHealth(workerName: string): Promise<WorkerHealthScore | null>;
    /**
     * Get metrics summary for all workers
     */
    getAllWorkersSummary(): Promise<ReadonlyArray<{
        workerName: string;
        health: WorkerHealthScore | null;
        metrics: {
            processed: number;
            errors: number;
            errorRate: number;
        };
    }>>;
    /**
     * Delete all metrics for a worker
     */
    deleteWorkerMetrics(workerName: string): Promise<void>;
    /**
     * Shutdown and disconnect
     */
    shutdown(): Promise<void>;
}>;
export { WorkerMetrics };
//# sourceMappingURL=WorkerMetrics.d.ts.map