use std::sync::atomic::{AtomicU64, Ordering};
pub(crate) static REQUESTS_TOTAL: AtomicU64 = AtomicU64::new(0);
pub(crate) static LOW_PRIORITY_DEFERRED_TOTAL: AtomicU64 = AtomicU64::new(0);
#[derive(Clone, Copy, Debug)]
pub struct RequestActivitySnapshot {
pub requests_total: u64,
pub low_priority_deferred_total: u64,
}
pub fn request_activity_snapshot() -> RequestActivitySnapshot {
RequestActivitySnapshot {
requests_total: REQUESTS_TOTAL.load(Ordering::Relaxed),
low_priority_deferred_total: LOW_PRIORITY_DEFERRED_TOTAL.load(Ordering::Relaxed),
}
}