Mountain/IPC/Enhanced/PerformanceDashboard/
DashboardHelpers.rs1#![allow(unused_variables, dead_code, unused_imports)]
2
3use super::MetricType::Enum as MetricType;
9
10pub fn get_memory_usage() -> Result<f64, String> { Ok(100.0) }
13
14pub fn get_cpu_usage() -> Result<f64, String> { Ok(25.0) }
17
18pub fn generate_trace_id() -> String { uuid::Uuid::new_v4().to_string() }
20
21pub fn generate_span_id() -> String { uuid::Uuid::new_v4().to_string() }
23
24pub fn generate_alert_id() -> String { uuid::Uuid::new_v4().to_string() }
26
27pub fn metric_type_name(metric_type:&MetricType) -> &'static str {
29 match metric_type {
30 MetricType::MessageProcessingTime => "Message Processing Time",
31
32 MetricType::ConnectionLatency => "Connection Latency",
33
34 MetricType::MemoryUsage => "Memory Usage",
35
36 MetricType::CpuUsage => "CPU Usage",
37
38 MetricType::NetworkThroughput => "Network Throughput",
39
40 MetricType::ErrorRate => "Error Rate",
41
42 MetricType::QueueSize => "Queue Size",
43 }
44}