pub trait PerformanceMonitor:
Send
+ Sync
+ Debug {
// Required methods
fn start_monitoring(&mut self) -> Result<(), AnalysisError>;
fn stop_monitoring(&mut self) -> Result<(), AnalysisError>;
fn get_current_metrics(&self) -> Result<HashMap<String, f64>, AnalysisError>;
fn get_monitor_name(&self) -> &str;
fn is_active(&self) -> bool;
}Expand description
Performance monitor trait
Required Methods§
Sourcefn start_monitoring(&mut self) -> Result<(), AnalysisError>
fn start_monitoring(&mut self) -> Result<(), AnalysisError>
Start monitoring
Sourcefn stop_monitoring(&mut self) -> Result<(), AnalysisError>
fn stop_monitoring(&mut self) -> Result<(), AnalysisError>
Stop monitoring
Sourcefn get_current_metrics(&self) -> Result<HashMap<String, f64>, AnalysisError>
fn get_current_metrics(&self) -> Result<HashMap<String, f64>, AnalysisError>
Get current metrics
Sourcefn get_monitor_name(&self) -> &str
fn get_monitor_name(&self) -> &str
Get monitor name