/** * Entity System Performance Monitor * * Tracks and benchmarks performance of the new entity system * vs legacy implementations. Provides metrics for optimization. */ interface PerformanceMetric { operation: string; entityName: string; duration: number; timestamp: Date; metadata?: Record; } interface BenchmarkResult { operation: string; entityName: string; averageDuration: number; minDuration: number; maxDuration: number; totalOperations: number; successRate: number; lastExecuted: Date; } interface SystemBenchmark { entitySystem: { initialization: number; configurationLoad: number; registryLookup: number; permissionCheck: number; }; apiGeneration: { schemaGeneration: number; queryGeneration: number; routeRegistration: number; }; uiGeneration: { pageTemplateRender: number; componentGeneration: number; formValidation: number; }; comparison: { legacyVsNew: { [operation: string]: { legacy: number; new: number; improvement: number; }; }; }; } declare class EntityPerformanceMonitor { private metrics; private benchmarks; private enabled; /** * Start performance tracking for an operation */ startTracking(operation: string, entityName: string, metadata?: Record): () => void; /** * Record a performance metric */ recordMetric(metric: PerformanceMetric): void; /** * Update benchmark statistics */ private updateBenchmark; /** * Get benchmark results for entity */ getEntityBenchmarks(entityName: string): BenchmarkResult[]; /** * Get all benchmark results */ getAllBenchmarks(): BenchmarkResult[]; /** * Get system-wide performance metrics */ getSystemMetrics(): SystemBenchmark; /** * Get metrics by operation name */ private getMetricsByOperation; /** * Calculate average duration from metrics */ private getAverageDuration; /** * Compare legacy vs new system performance */ private getLegacyComparison; /** * Generate performance report */ generateReport(): string; /** * Clear all metrics and benchmarks */ clear(): void; /** * Enable/disable performance monitoring */ setEnabled(enabled: boolean): void; /** * Get current monitoring status */ isEnabled(): boolean; } export declare const entityPerformanceMonitor: EntityPerformanceMonitor; /** * Performance tracking decorator */ export declare function trackPerformance(operation: string, entityName?: string): unknown>(target: unknown, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; /** * Simple performance tracking function */ export declare function withPerformanceTracking(operation: string, entityName: string, fn: () => T): T; /** * Export for use in performance testing */ export { type PerformanceMetric, type BenchmarkResult, type SystemBenchmark }; //# sourceMappingURL=performance.d.ts.map