vibe-coder-mcp
Version:
Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.
155 lines • 4.78 kB
TypeScript
export interface RealTimeMetrics {
responseTime: number;
memoryUsage: number;
cpuUsage: number;
cacheHitRate: number;
activeConnections: number;
queueLength: number;
timestamp: number;
}
export interface OptimizationSuggestion {
category: 'memory' | 'cpu' | 'cache' | 'io' | 'network';
priority: 'low' | 'medium' | 'high' | 'critical';
description: string;
implementation: string;
estimatedImpact: string;
}
export type MetricType = 'response_time' | 'memory_usage' | 'cpu_usage' | 'disk_io' | 'cache_hit_rate' | 'task_throughput' | 'error_rate' | 'agent_performance';
export interface PerformanceMetric {
id: string;
type: MetricType;
name: string;
value: number;
unit: string;
timestamp: Date;
tags: Record<string, string>;
threshold?: {
warning: number;
critical: number;
};
}
export interface PerformanceAlert {
id: string;
metricId: string;
type: 'warning' | 'critical';
message: string;
value: number;
threshold: number;
timestamp: Date;
resolved: boolean;
resolvedAt?: Date;
}
export interface PerformanceBottleneck {
id: string;
component: string;
type: 'memory' | 'cpu' | 'io' | 'network' | 'cache';
severity: 'low' | 'medium' | 'high' | 'critical';
description: string;
metrics: PerformanceMetric[];
suggestions: string[];
detectedAt: Date;
}
export interface PerformanceRegression {
id: string;
metricType: MetricType;
baselineValue: number;
currentValue: number;
degradationPercentage: number;
detectedAt: Date;
timeWindow: string;
}
export interface PerformanceMonitorConfig {
enabled: boolean;
metricsInterval: number;
enableAlerts: boolean;
performanceThresholds: {
maxResponseTime: number;
maxMemoryUsage: number;
maxCpuUsage: number;
};
bottleneckDetection: {
enabled: boolean;
analysisInterval: number;
minSampleSize: number;
};
regressionDetection: {
enabled: boolean;
baselineWindow: number;
comparisonWindow: number;
significanceThreshold: number;
};
}
export declare class PerformanceMonitor {
private static instance;
private config;
private metrics;
private alerts;
private bottlenecks;
private regressions;
private monitoringInterval;
private analysisInterval;
private memoryManager;
private metricCounter;
private realTimeMetrics;
private operationTimings;
private activeOperations;
private optimizationSuggestions;
private constructor();
static getInstance(config?: PerformanceMonitorConfig): PerformanceMonitor;
private startMonitoring;
stopMonitoring(): void;
private startBottleneckAnalysis;
stopBottleneckAnalysis(): void;
private collectSystemMetrics;
recordMetric(metric: Omit<PerformanceMetric, 'id'>): void;
private checkThresholds;
private generateAlert;
private analyzeBottlenecks;
private detectBottleneck;
private getBottleneckType;
private getBottleneckSuggestions;
private detectRegressions;
getComprehensivePerformanceSummary(): {
metrics: {
[key: string]: PerformanceMetric;
};
activeAlerts: PerformanceAlert[];
bottlenecks: PerformanceBottleneck[];
regressions: PerformanceRegression[];
overallHealth: 'good' | 'warning' | 'critical';
};
resolveAlert(alertId: string): boolean;
getMetrics(type: MetricType, name?: string, timeRange?: {
start: Date;
end: Date;
}): PerformanceMetric[];
startOperation(operationId: string): void;
endOperation(operationId: string, metadata?: Record<string, unknown>): number;
getCurrentRealTimeMetrics(): RealTimeMetrics;
private getAverageResponseTime;
private getEstimatedCpuUsage;
private getCacheHitRate;
private getActiveConnectionCount;
private generateOptimizationSuggestion;
autoOptimize(): Promise<{
applied: string[];
skipped: string[];
errors: string[];
}>;
private optimizeMemoryUsage;
private optimizeCacheStrategy;
private optimizeConcurrentProcessing;
private optimizeResponseTime;
getOptimizationSuggestions(category?: OptimizationSuggestion['category']): OptimizationSuggestion[];
getPerformanceSummary(periodMinutes?: number): {
averageResponseTime: number;
maxResponseTime: number;
memoryUsage: number;
alertCount: number;
bottleneckCount: number;
targetsMet: boolean;
};
shutdown(): void;
}
export declare function getPerformanceMonitor(): PerformanceMonitor | null;
//# sourceMappingURL=performance-monitor.d.ts.map