use super::*;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MappingAnalyticsConfig {
pub enable_analytics: bool,
pub tracking_level: AnalysisDepth,
pub metrics_to_track: Vec<TrackingMetric>,
pub anomaly_detection: AnomalyDetectionConfig,
pub alerting: AlertConfig,
pub reporting: ReportingConfig,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AnomalyDetectionConfig {
pub enable_detection: bool,
pub detection_method: AnomalyDetectionMethod,
pub threshold: f64,
pub window_size: usize,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AlertConfig {
pub enable_alerts: bool,
pub severity_threshold: f64,
pub notification_methods: Vec<NotificationMethod>,
pub cooldown_period: Duration,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReportingConfig {
pub enable_reporting: bool,
pub report_frequency: Duration,
pub report_format: ReportFormat,
pub content_config: ReportContentConfig,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ReportContentConfig {
pub include_performance_metrics: bool,
pub include_trend_analysis: bool,
pub include_recommendations: bool,
pub include_visualizations: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct RealtimeAnalyticsResult {
pub current_metrics: HashMap<String, f64>,
pub performance_trends: HashMap<String, Vec<(SystemTime, f64)>>,
pub anomalies: Vec<DetectedAnomaly>,
pub resource_utilization: ResourceUtilization,
pub quality_assessments: Vec<QualityAssessment>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DetectedAnomaly {
pub timestamp: SystemTime,
pub anomaly_type: String,
pub severity: f64,
pub description: String,
pub affected_metrics: Vec<String>,
pub recommended_actions: Vec<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ResourceUtilization {
pub cpu_usage: f64,
pub memory_usage: f64,
pub disk_io: f64,
pub network_usage: f64,
pub gpu_usage: Option<f64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct QualityAssessment {
pub timestamp: SystemTime,
pub metric_type: QualityMetricType,
pub score: f64,
pub confidence: f64,
pub baseline_comparison: f64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OptimizationRecommendations {
pub algorithm_recommendations: Vec<AlgorithmRecommendation>,
pub parameter_suggestions: Vec<ParameterSuggestion>,
pub hardware_optimizations: Vec<HardwareOptimization>,
pub improvement_predictions: HashMap<String, f64>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AlgorithmRecommendation {
pub algorithm: String,
pub confidence: f64,
pub expected_gain: f64,
pub reasoning: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ParameterSuggestion {
pub parameter: String,
pub value_range: (f64, f64),
pub priority: SuggestionPriority,
pub impact: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HardwareOptimization {
pub optimization_type: String,
pub target_component: String,
pub parameters: HashMap<String, f64>,
pub expected_benefit: f64,
pub complexity: String,
}