pub trait MetricsCollector: Send + Sync + Clone {
fn record_vm_boot(&self, duration_secs: f64);
fn inc_vm_state(&self, state: &str);
fn dec_vm_state(&self, state: &str);
fn inc_vm_created(&self);
fn inc_vm_destroyed(&self);
fn record_exec(&self, duration_secs: f64, success: bool);
fn inc_cache_hit(&self);
fn inc_cache_miss(&self);
}
#[derive(Debug, Clone, Default)]
pub struct NoopMetrics;
impl MetricsCollector for NoopMetrics {
fn record_vm_boot(&self, _duration_secs: f64) {}
fn inc_vm_state(&self, _state: &str) {}
fn dec_vm_state(&self, _state: &str) {}
fn inc_vm_created(&self) {}
fn inc_vm_destroyed(&self) {}
fn record_exec(&self, _duration_secs: f64, _success: bool) {}
fn inc_cache_hit(&self) {}
fn inc_cache_miss(&self) {}
}