/**
 * Performance monitoring and metrics utilities
 */
export interface PerformanceMetric {
    name: string;
    startTime: number;
    endTime?: number;
    duration?: number;
    metadata?: Record<string, unknown>;
}
export interface PerformanceReport {
    metrics: PerformanceMetric[];
    totalDuration: number;
    averageDuration: number;
    slowest: PerformanceMetric | null;
    fastest: PerformanceMetric | null;
}
/**
 * Performance monitor for tracking operation timing
 */
export declare class PerformanceMonitor {
    private metrics;
    private completed;
    private enabled;
    /**
     * Enable or disable performance monitoring
     */
    setEnabled(enabled: boolean): void;
    /**
     * Check if monitoring is enabled
     */
    isEnabled(): boolean;
    /**
     * Start measuring an operation
     * @param name - Unique name for this measurement
     * @param metadata - Optional metadata to attach
     * @returns The metric object
     */
    start(name: string, metadata?: Record<string, unknown>): PerformanceMetric;
    /**
     * Stop measuring an operation
     * @param name - Name of the measurement to stop
     * @returns The completed metric with duration
     */
    end(name: string): PerformanceMetric | null;
    /**
     * Measure an async function
     * @param name - Name for this measurement
     * @param fn - Function to measure
     * @param metadata - Optional metadata
     * @returns Promise with the function result
     */
    measure<T>(name: string, fn: () => Promise<T>, metadata?: Record<string, unknown>): Promise<T>;
    /**
     * Measure a synchronous function
     * @param name - Name for this measurement
     * @param fn - Function to measure
     * @param metadata - Optional metadata
     * @returns The function result
     */
    measureSync<T>(name: string, fn: () => T, metadata?: Record<string, unknown>): T;
    /**
     * Get all completed metrics
     */
    getMetrics(): PerformanceMetric[];
    /**
     * Get metrics for a specific operation name
     */
    getMetricsByName(name: string): PerformanceMetric[];
    /**
     * Get a performance report
     */
    getReport(): PerformanceReport;
    /**
     * Get metrics summary grouped by operation name
     */
    getSummary(): Record<string, {
        count: number;
        totalDuration: number;
        averageDuration: number;
        minDuration: number;
        maxDuration: number;
    }>;
    /**
     * Format a duration in milliseconds to a human-readable string
     */
    static formatDuration(ms: number): string;
    /**
     * Print a formatted report to console
     */
    printReport(): void;
    /**
     * Clear all metrics
     */
    clear(): void;
    /**
     * Export metrics to JSON
     */
    export(): string;
}
/**
 * Global performance monitor instance
 */
export declare const globalMonitor: PerformanceMonitor;
/**
 * Decorator to measure method execution time
 * @param target - Class prototype
 * @param propertyKey - Method name
 * @param descriptor - Property descriptor
 */
export declare function Measure(target: unknown, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
/**
 * Simple timer utility
 */
export declare class Timer {
    private startTime;
    constructor();
    /**
     * Get elapsed time in milliseconds
     */
    elapsed(): number;
    /**
     * Reset the timer
     */
    reset(): void;
    /**
     * Get formatted elapsed time
     */
    format(): string;
}
