/**
 * Performance Monitoring System (Phase 3.2.2)
 *
 * Comprehensive performance monitoring and debugging tools for TachUI.
 * Tracks component lifecycle metrics, reactive system performance,
 * and provides detailed debugging information.
 */
/**
 * Performance metric types
 */
export interface PerformanceMetric {
    name: string;
    value: number;
    unit: 'ms' | 'bytes' | 'count';
    timestamp: number;
    category: 'component' | 'reactive' | 'render' | 'memory';
    componentId?: string;
    phase?: string;
}
/**
 * Component performance data
 */
export interface ComponentMetrics {
    id: string;
    name: string;
    mountTime: number;
    renderTime: number;
    updateCount: number;
    propsChanges: number;
    lastRenderDuration: number;
    memoryUsage: number;
    children: ComponentMetrics[];
}
/**
 * Reactive system metrics
 */
export interface ReactiveMetrics {
    signalCount: number;
    computedCount: number;
    effectCount: number;
    signalUpdates: number;
    computedRecalculations: number;
    effectExecutions: number;
    averageUpdateTime: number;
    memoryFootprint: number;
}
/**
 * Performance monitoring options
 */
export interface MonitoringOptions {
    enabled: boolean;
    trackComponents: boolean;
    trackReactive: boolean;
    trackMemory: boolean;
    trackRender: boolean;
    sampleRate: number;
    maxMetrics: number;
}
/**
 * Performance event listener
 */
export type PerformanceListener = (metric: PerformanceMetric) => void;
/**
 * Comprehensive performance monitoring system
 */
export declare class PerformanceMonitor {
    private static instance;
    private options;
    private metrics;
    private componentMetrics;
    private reactiveMetrics;
    private listeners;
    private timers;
    private metricsSignal;
    private setMetrics;
    private componentMetricsSignal;
    private setComponentMetrics;
    constructor();
    static getInstance(): PerformanceMonitor;
    /**
     * Configure monitoring options
     */
    configure(options: Partial<MonitoringOptions>): void;
    /**
     * Enable performance monitoring
     */
    enable(): void;
    /**
     * Disable performance monitoring
     */
    disable(): void;
    /**
     * Check if monitoring is enabled
     */
    isEnabled(): boolean;
    /**
     * Start timing an operation
     */
    startTimer(name: string): void;
    /**
     * End timing and record metric
     */
    endTimer(name: string, category?: PerformanceMetric['category'], componentId?: string): number;
    /**
     * Record a custom metric
     */
    recordMetric(metric: PerformanceMetric): void;
    /**
     * Track component mount
     */
    trackComponentMount(componentId: string, componentName: string): void;
    /**
     * Track component unmount
     */
    trackComponentUnmount(componentId: string): void;
    /**
     * Track component render
     */
    trackComponentRender(componentId: string, duration: number): void;
    /**
     * Track props changes
     */
    trackPropsChange(componentId: string, changedKeys: string[]): void;
    /**
     * Track reactive system metrics
     */
    trackReactiveOperation(type: 'signal' | 'computed' | 'effect', operation: 'create' | 'update' | 'execute', duration?: number): void;
    /**
     * Track memory usage
     */
    trackMemoryUsage(): void;
    /**
     * Estimate memory usage (simplified)
     */
    private estimateMemoryUsage;
    /**
     * Get all metrics
     */
    getMetrics(): PerformanceMetric[];
    /**
     * Get reactive metrics signal
     */
    getMetricsSignal(): () => PerformanceMetric[];
    /**
     * Get component metrics
     */
    getComponentMetrics(): Map<string, ComponentMetrics>;
    /**
     * Get component metrics signal
     */
    getComponentMetricsSignal(): () => Map<string, ComponentMetrics>;
    /**
     * Get reactive system metrics
     */
    getReactiveMetrics(): ReactiveMetrics;
    /**
     * Get metrics by category
     */
    getMetricsByCategory(category: PerformanceMetric['category']): PerformanceMetric[];
    /**
     * Get metrics by component
     */
    getMetricsByComponent(componentId: string): PerformanceMetric[];
    /**
     * Get average metric value
     */
    getAverageMetric(name: string): number;
    /**
     * Get performance summary
     */
    getSummary(): {
        totalMetrics: number;
        componentCount: number;
        reactive: ReactiveMetrics;
        averageRenderTime: number;
        averageMemoryUsage: number;
        mostActiveComponent: string | null;
    };
    /**
     * Add performance listener
     */
    addListener(listener: PerformanceListener): () => void;
    /**
     * Clear all metrics
     */
    clear(): void;
    /**
     * Export metrics to JSON
     */
    exportMetrics(): string;
    /**
     * Import metrics from JSON
     */
    importMetrics(json: string): void;
}
/**
 * Global performance monitor instance
 */
export declare const globalPerformanceMonitor: PerformanceMonitor;
/**
 * Performance monitoring decorators and utilities
 */
export declare const performanceUtils: {
    /**
     * Measure function execution time
     */
    measure<T>(name: string, fn: () => T, category?: PerformanceMetric["category"]): T;
    /**
     * Async function measurement
     */
    measureAsync<T>(name: string, fn: () => Promise<T>, category?: PerformanceMetric["category"]): Promise<T>;
    /**
     * Create a performance tracking wrapper for components
     */
    withPerformanceTracking<T extends (...args: any[]) => any>(componentFn: T, componentName: string): T;
};
//# sourceMappingURL=performance.d.ts.map