/** * Performance Helper Utilities * Extracted helper functions for performance metrics formatting and calculations */ import type { PerformanceMetrics } from "../../performance/PerformanceMonitor.js"; import type { BenchmarkComparison, PerformanceAnomaly } from "../../performance/PerformanceAnalytics.js"; /** * Performance alert interface */ export interface PerformanceAlert { severity: string; category: string; message: string; metric: string; actualValue: number; threshold: number; timestamp: number; } /** * Calculate overall health status from metrics */ export declare function calculateHealthStatus(metrics: PerformanceMetrics): string; /** * Calculate performance score from metrics */ export declare function calculatePerformanceScore(metrics: PerformanceMetrics): number; /** * Calculate cache efficiency rating */ export declare function calculateCacheEfficiency(cacheMetrics: PerformanceMetrics["cache"]): string; /** * Format uptime in human-readable format */ export declare function formatUptime(uptimeMs: number): string; /** * Parse timeframe string to milliseconds */ export declare function parseTimeframe(timeframe: string): number; /** * Extract metric value from data point */ export declare function extractMetricValue(dataPoint: PerformanceMetrics, metric: string): number; /** * Process historical data for charting */ export declare function processHistoricalDataForChart(data: PerformanceMetrics[], requestedMetrics?: string[]): Record; /** * Calculate average of number array */ export declare function calculateAverage(values: number[]): number; /** * Format benchmark status with emoji */ export declare function formatBenchmarkStatus(status: string): string; /** * Get benchmark improvement description */ export declare function getBenchmarkImprovementDescription(benchmark: BenchmarkComparison): string; /** * Calculate overall ranking from benchmarks */ export declare function calculateOverallRanking(benchmarks: BenchmarkComparison[]): { percentile: number; status: string; }; /** * Format alert message */ export declare function formatAlertMessage(alert: PerformanceAlert): string; /** * Format anomaly description */ export declare function formatAnomalyDescription(anomaly: PerformanceAnomaly): string; /** * Calculate alert status from summaries */ export declare function calculateAlertStatus(alertSummary: { critical: number; error: number; warning: number; }, anomalySummary: { critical: number; major: number; moderate: number; minor: number; }): string; /** * Format priority with emoji */ export declare function formatPriority(priority: string): string; /** * Format effort with emoji */ export declare function formatEffort(effort: string): string; /** * Calculate estimated impact from recommendations */ export declare function calculateEstimatedImpact(recommendations: Array<{ priority: string; }>): string; /** * Convert metrics data to CSV format */ export declare function convertToCSV(data: { currentMetrics: PerformanceMetrics; }): string; /** * Create summary report from data */ export declare function createSummaryReport(data: { currentMetrics: PerformanceMetrics; analytics?: { insights?: unknown[]; }; }): Record; //# sourceMappingURL=PerformanceHelpers.d.ts.map