azureai-optimizer
Version:
AI-Powered Azure Infrastructure Optimization via Model Context Protocol
113 lines • 3.64 kB
TypeScript
/**
* Performance Analysis Tool
* AI-powered Azure performance optimization analysis
*/
import { AuthContext } from '../auth/azure-auth.js';
import { Tool, ToolConfig } from './registry.js';
export interface PerformanceAnalysisArgs {
subscription_id: string;
resource_group?: string;
resource_id?: string;
analysis_days?: number;
performance_threshold?: number;
}
export interface PerformanceAnalysisResult {
success: boolean;
data: {
summary: {
total_resources_analyzed: number;
performance_issues_found: number;
bottlenecks_identified: number;
optimization_opportunities: number;
};
performance_insights: Array<{
resource_id: string;
resource_name: string;
resource_type: string;
performance_score: number;
bottlenecks: Array<{
type: 'CPU' | 'Memory' | 'Disk' | 'Network' | 'Database';
severity: 'Low' | 'Medium' | 'High' | 'Critical';
description: string;
impact: string;
recommendations: string[];
}>;
optimization_recommendations: Array<{
title: string;
description: string;
expected_improvement: string;
implementation_effort: 'Low' | 'Medium' | 'High';
cost_impact: 'Decrease' | 'Neutral' | 'Increase';
}>;
}>;
trending_analysis: {
performance_trend: 'Improving' | 'Stable' | 'Degrading';
trend_analysis: string;
peak_usage_patterns: Array<{
metric: string;
peak_time: string;
peak_value: number;
average_value: number;
}>;
};
};
metadata: {
execution_time?: number;
api_calls: number;
analysis_period: string;
};
}
export declare class PerformanceAnalysisTool implements Tool {
name: string;
description: string;
inputSchema: {
type: string;
properties: {
subscription_id: {
type: string;
description: string;
};
resource_group: {
type: string;
description: string;
};
resource_id: {
type: string;
description: string;
};
analysis_days: {
type: string;
description: string;
default: number;
minimum: number;
maximum: number;
};
performance_threshold: {
type: string;
description: string;
default: number;
minimum: number;
maximum: number;
};
};
required: string[];
};
private logger;
constructor(_config: ToolConfig);
execute(args: PerformanceAnalysisArgs, _context: AuthContext): Promise<PerformanceAnalysisResult>;
private getResourcesToAnalyze;
private extractResourceType;
private analyzeResourcePerformance;
private getResourceMetrics;
private processPerformanceMetrics;
private getDefaultMetrics;
private identifyBottlenecks;
private getSeverity;
private generateOptimizationRecommendations;
private calculatePerformanceScore;
private performTrendingAnalysis;
private generateTrendAnalysis;
private identifyPeakPatterns;
private calculateSummary;
}
//# sourceMappingURL=performance-analysis.d.ts.map