implement uptime stats

This commit is contained in:
postscriptum 2026-03-22 23:25:34 +02:00
parent 6be42e596a
commit 29895bf35a
3 changed files with 34 additions and 5 deletions

View file

@ -18,11 +18,12 @@ impl Total {
..Self::default()
}
}
pub fn snap(&self) -> Snap {
pub fn snap(&self, seconds_from_startup: u64) -> Snap {
Snap::shot(
self.entries.load(Ordering::Relaxed),
self.request.load(Ordering::Relaxed),
self.blocked.load(Ordering::Relaxed),
seconds_from_startup,
)
}
pub fn set_entries(&self, value: u64) {