#[cfg(not(any(feature = "metrics", feature = "memory")))]
impl Metrics {
pub fn record_request(&self, _service: &str, _layer: &str, _op: &str, _result: &str) {}
pub fn record_duration(&self, _service: &str, _layer: &str, _op: &str, _duration_secs: f64) {}
pub fn set_health(&self, _service: &str, _status: u8) {}
pub fn set_wal_size(&self, _service: &str, _size: usize) {}
pub fn set_batch_buffer_size(&self, _service: &str, _size: usize) {}
pub fn set_batch_success_rate(&self, _service: &str, _rate: f64) {}
pub fn set_batch_throughput(&self, _service: &str, _throughput: f64) {}
pub fn get_counters(&self) -> (u64, u64, u64, u64, u64, u64, u64, u64, u64) {
(0, 0, 0, 0, 0, 0, 0, 0, 0)
}
}
#[cfg(not(any(feature = "metrics", feature = "memory")))]
lazy_static::lazy_static! {
pub static ref GLOBAL_METRICS: Metrics = Metrics;
}
#[cfg(not(any(feature = "metrics", feature = "memory")))]
pub fn get_metrics_string() -> String {
String::new()
}