sort_governor/service/stats.rs
1//! A point-in-time snapshot of the Sorter's governance counters.
2
3/// Observability counters reported by [`crate::SorterHandle::stats`].
4#[derive(Debug, Clone, Copy, Default)]
5pub struct SorterStats {
6 /// Sorts admitted on the in-memory path since startup.
7 pub in_memory_sorts: u64,
8 /// Sorts admitted on the external (spilling) path since startup.
9 pub external_sorts: u64,
10 /// External sorts currently admitted (holding or awaiting fd permits).
11 pub active_external_sorts: u32,
12 /// File-descriptor permits currently available to new external sorts.
13 pub fd_permits_available: u32,
14 /// Total file-descriptor permits the Sorter rations.
15 pub fd_permits_total: u32,
16}