/**
 * Performance Monitoring System
 * Tracks operation duration and performance metrics.
 * Ported from Python monitoring/performance.py
 */
export interface PerformanceStats {
    operation: string;
    count: number;
    total_calls: number;
    min: number;
    max: number;
    mean: number;
    median: number;
    p95: number;
    p99: number;
}
/**
 * Monitors and tracks performance metrics for operations.
 */
export declare class PerformanceMonitor {
    private metrics;
    private operationCounts;
    private slowThreshold;
    /**
     * Record the duration of an operation.
     */
    recordDuration(operation: string, duration: number): void;
    /**
     * Get statistics for an operation.
     */
    getStats(operation: string): PerformanceStats | null;
    /**
     * Get statistics for all operations.
     */
    getAllStats(): Record<string, PerformanceStats>;
    /**
     * Calculate mean of array.
     */
    private mean;
    /**
     * Calculate median of array.
     */
    private median;
    /**
     * Calculate percentile value.
     */
    private percentile;
    /**
     * Clear metrics for an operation or all operations.
     */
    clear(operation?: string): void;
    /**
     * Set the threshold for logging slow operations.
     */
    setSlowThreshold(threshold: number): void;
}
export declare function getMonitor(): PerformanceMonitor;
/**
 * Decorator to measure function performance.
 *
 * Usage:
 *   @measurePerformance()
 *   processEvent(player, event) {
 *     // function code
 *   }
 *
 *   @measurePerformance("custom_operation")
 *   complexCalculation() {
 *     // function code
 *   }
 */
export declare function measurePerformance(operationName?: string): <T extends (...args: unknown[]) => unknown>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T>;
/**
 * Class for measuring performance of code blocks.
 *
 * Usage:
 *   const block = new MeasureBlock('database_query');
 *   block.start();
 *   await executeQuery();
 *   block.end();
 */
export declare class MeasureBlock {
    private operationName;
    private startTime;
    constructor(operationName: string);
    start(): void;
    end(): void;
}
/**
 * Helper function to measure a code block.
 *
 * Usage:
 *   const result = await measureBlock('database_query', async () => {
 *     return await executeQuery();
 *   });
 */
export declare function measureBlock<T>(operationName: string, fn: () => T | Promise<T>): Promise<T>;
/**
 * Log a performance report for all monitored operations.
 */
export declare function logPerformanceReport(): void;
export declare const performanceMonitor: {
    PerformanceMonitor: typeof PerformanceMonitor;
    MeasureBlock: typeof MeasureBlock;
    getMonitor: typeof getMonitor;
    measurePerformance: typeof measurePerformance;
    measureBlock: typeof measureBlock;
    logPerformanceReport: typeof logPerformanceReport;
};
//# sourceMappingURL=performance.d.ts.map