/** * Performance Monitor for ConversionIQ SDK * Tracks Core Web Vitals and SDK performance metrics */ import { ConversionIQConfig } from '../types/index'; interface PerformanceMetric { name: string; value: number; timestamp: number; rating: 'good' | 'needs-improvement' | 'poor'; } interface WebVitalsData { CLS?: PerformanceMetric; FID?: PerformanceMetric; FCP?: PerformanceMetric; LCP?: PerformanceMetric; TTFB?: PerformanceMetric; } export declare class PerformanceMonitor { private config; private observers; private vitals; private sdkMetrics; private isSupported; constructor(config: ConversionIQConfig); /** * Initialize performance monitoring */ init(): void; /** * Measure Core Web Vitals */ private measureWebVitals; /** * Measure SDK-specific performance metrics */ private measureSDKPerformance; /** * Setup navigation timing measurements */ private setupNavigationTiming; /** * Observe performance metrics */ private observeMetric; /** * Measure synchronous operation performance */ measureSync(name: string, fn: () => T): T; /** * Measure asynchronous operation performance */ measureAsync(name: string, fn: () => Promise): Promise; /** * Get performance rating based on metric thresholds */ private getRating; /** * Get all Web Vitals data */ getWebVitals(): WebVitalsData; /** * Get SDK performance metrics */ getSDKMetrics(): Record; /** * Get performance summary */ getPerformanceSummary(): { webVitals: WebVitalsData; sdkMetrics: Record; overallRating: 'good' | 'needs-improvement' | 'poor'; }; /** * Report performance data to analytics endpoint */ reportPerformance(): Promise; /** * Clean up performance observers */ destroy(): void; } export {}; //# sourceMappingURL=PerformanceMonitor.d.ts.map