UNPKG

@simonecoelhosfo/optimizely-mcp-server

Version:

Optimizely MCP Server for AI assistants with integrated CLI tools

100 lines 2.7 kB
/** * Summary Report Generator for Performance Optimization * @description Generates comprehensive performance reports with detailed metrics, * SQL operation analysis, and optimization recommendations based on sync results. * * Features: * - Performance metrics visualization * - SQL operation reduction analysis * - Entity-specific performance breakdowns * - Time complexity analysis * - Optimization recommendations * - Export to various formats (console, JSON, markdown) * * @author Optimizely MCP Server * @version 2.0.0 */ /** * Performance metrics for entity sync */ export interface EntityPerformanceMetrics { entityType: string; recordCount: number; sqlOperationsBefore: number; sqlOperationsAfter: number; reductionPercent: number; syncDuration: number; averageTimePerRecord: number; batchSize: number; } /** * Complete sync performance report */ export interface PerformanceReport { summary: { totalDuration: number; totalEntities: number; totalRecords: number; totalSqlBefore: number; totalSqlAfter: number; overallReduction: number; achievedTarget: boolean; }; entityMetrics: EntityPerformanceMetrics[]; phaseTimings: Record<string, number>; recommendations: string[]; timestamp: string; configuration: { batchSize: number; platform: string; projectCount: number; }; } /** * Summary Report Generator */ export declare class SummaryReporter { private report; constructor(); /** * Initialize empty report structure */ private initializeReport; /** * Add entity performance metrics */ addEntityMetrics(metrics: EntityPerformanceMetrics): void; /** * Add phase timing */ addPhaseTiming(phase: string, duration: number): void; /** * Calculate final metrics and generate recommendations */ finalize(totalDuration: number, projectCount: number): void; /** * Generate optimization recommendations based on metrics */ private generateRecommendations; /** * Generate console output */ toConsole(): void; /** * Export to JSON file */ toJSON(filepath?: string): string; /** * Export to Markdown format */ toMarkdown(filepath?: string): string; /** * Get raw report data */ getReport(): PerformanceReport; /** * Create entity metrics from progress data */ static createEntityMetrics(entityType: string, recordCount: number, syncDuration: number, batchOperations?: number): EntityPerformanceMetrics; } //# sourceMappingURL=SummaryReporter.d.ts.map