/**
 * Performance Monitor
 *
 * Tracks and reports performance metrics for operations.
 *
 * @since v1.29.0
 */
/**
 * Performance metric entry
 */
export interface PerformanceMetric {
    /** Metric name */
    name: string;
    /** Value */
    value: number;
    /** Unit of measurement */
    unit: string;
    /** When recorded */
    timestamp: number;
}
/**
 * Timer result
 */
export interface TimerResult {
    /** Duration in milliseconds */
    duration: number;
    /** Start time */
    startTime: number;
    /** End time */
    endTime: number;
}
/**
 * Aggregated metrics
 */
export interface AggregatedMetrics {
    /** Average value */
    avg: number;
    /** Minimum value */
    min: number;
    /** Maximum value */
    max: number;
    /** Count of samples */
    count: number;
    /** Total sum */
    sum: number;
}
/**
 * Performance report
 */
export interface PerformanceReport {
    /** Report generation time */
    generatedAt: string;
    /** Metrics by name */
    metrics: Record<string, AggregatedMetrics>;
    /** Active timers */
    activeTimers: string[];
    /** Memory usage */
    memory?: {
        heapUsed: number;
        heapTotal: number;
        external: number;
        rss: number;
    };
}
/**
 * Performance monitor service
 */
export declare class PerformanceMonitor {
    private metrics;
    private timers;
    private maxSamples;
    constructor(options?: {
        maxSamples?: number;
    });
    /**
     * Start a timer
     * @returns Function to stop the timer and get duration
     */
    startTimer(name: string): () => TimerResult;
    /**
     * Time an async operation
     */
    timeAsync<T>(name: string, operation: () => Promise<T>): Promise<{
        result: T;
        duration: number;
    }>;
    /**
     * Time a sync operation
     */
    timeSync<T>(name: string, operation: () => T): {
        result: T;
        duration: number;
    };
    /**
     * Check if a timer is running
     */
    isTimerRunning(name: string): boolean;
    /**
     * Get elapsed time for a running timer
     */
    getElapsed(name: string): number | null;
    /**
     * Record a metric
     */
    recordMetric(name: string, value: number, unit?: string): void;
    /**
     * Get metrics for a name
     */
    getMetrics(name: string): PerformanceMetric[];
    /**
     * Get aggregated metrics for a name
     */
    getAggregated(name: string): AggregatedMetrics | null;
    /**
     * Get all metric names
     */
    getMetricNames(): string[];
    /**
     * Get a full performance report
     */
    getReport(): PerformanceReport;
    /**
     * Get a formatted report string
     */
    getFormattedReport(): string;
    /**
     * Clear all metrics
     */
    clearMetrics(): void;
    /**
     * Clear metrics for a specific name
     */
    clearMetric(name: string): void;
    /**
     * Reset the monitor
     */
    reset(): void;
}
/**
 * Get the singleton performance monitor
 */
export declare function getPerformanceMonitor(): PerformanceMonitor;
/**
 * Reset the singleton (for testing)
 */
export declare function resetPerformanceMonitor(): void;
//# sourceMappingURL=performance-monitor.d.ts.map