/**
 * @file Metrics Collector
 * Collect and aggregate evaluation metrics
 */
import type { ScoreResult } from "../../types/scorerTypes.js";
import type { PipelineResult } from "../pipeline/evaluationPipeline.js";
/**
 * Scorer metrics
 */
export type ScorerMetrics = {
    scorerId: string;
    scorerName: string;
    totalExecutions: number;
    successfulExecutions: number;
    failedExecutions: number;
    passedCount: number;
    failedCount: number;
    totalScore: number;
    minScore: number;
    maxScore: number;
    totalDuration: number;
    averageDuration: number;
    averageScore: number;
    passRate: number;
    lastExecutionTime: number;
};
/**
 * Pipeline metrics
 */
export type PipelineMetrics = {
    pipelineName: string;
    totalExecutions: number;
    passedCount: number;
    failedCount: number;
    totalScore: number;
    minScore: number;
    maxScore: number;
    totalDuration: number;
    averageDuration: number;
    averageScore: number;
    passRate: number;
    lastExecutionTime: number;
    scorerMetrics: Map<string, ScorerMetrics>;
};
/**
 * Aggregated metrics
 */
export type AggregatedMetrics = {
    totalEvaluations: number;
    overallPassRate: number;
    averageScore: number;
    averageDuration: number;
    scoreDistribution: {
        excellent: number;
        good: number;
        fair: number;
        poor: number;
        failing: number;
    };
    pipelineMetrics: Map<string, PipelineMetrics>;
    scorerMetrics: Map<string, ScorerMetrics>;
    collectionStartTime: number;
    lastUpdateTime: number;
};
/**
 * Metrics collector for evaluation data
 */
export declare class MetricsCollector {
    private _pipelineMetrics;
    private _scorerMetrics;
    private _collectionStartTime;
    private _lastUpdateTime;
    private _totalEvaluations;
    private _scoreDistribution;
    /**
     * Record a scorer execution
     */
    recordScorer(scorerId: string, scorerName: string, result: ScoreResult): void;
    /**
     * Record a pipeline execution
     */
    recordPipeline(result: PipelineResult): void;
    /**
     * Get aggregated metrics
     */
    getMetrics(): AggregatedMetrics;
    /**
     * Get metrics for a specific scorer
     */
    getScorerMetrics(scorerId: string): ScorerMetrics | undefined;
    /**
     * Get metrics for a specific pipeline
     */
    getPipelineMetrics(pipelineName: string): PipelineMetrics | undefined;
    /**
     * Get summary statistics
     */
    getSummary(): {
        totalEvaluations: number;
        passRate: number;
        averageScore: number;
        topScorers: Array<{
            id: string;
            passRate: number;
        }>;
        bottomScorers: Array<{
            id: string;
            passRate: number;
        }>;
    };
    /**
     * Export metrics as JSON
     */
    exportJson(): string;
    /**
     * Reset all metrics
     */
    reset(): void;
    /**
     * Create empty scorer metrics
     */
    private _createEmptyScorerMetrics;
    /**
     * Create empty pipeline metrics
     */
    private _createEmptyPipelineMetrics;
    /**
     * Update scorer metrics with new result
     */
    private _updateScorerMetrics;
    /**
     * Update pipeline metrics with new result
     */
    private _updatePipelineMetrics;
    /**
     * Update score distribution
     */
    private _updateScoreDistribution;
}
/**
 * Create a metrics collector
 */
export declare function createMetricsCollector(): MetricsCollector;
/**
 * Global metrics collector instance
 */
export declare const globalMetricsCollector: MetricsCollector;
