pub struct PartitionStats {
pub name: String,
pub entry_count: usize,
pub used_bytes: usize,
pub max_bytes: usize,
pub hits: u64,
pub misses: u64,
pub evictions: u64,
}Expand description
Snapshot of per-partition statistics.
Fields§
§name: StringPartition name.
entry_count: usizeNumber of entries.
used_bytes: usizeUsed bytes.
max_bytes: usizeMaximum allowed bytes.
hits: u64Cumulative hit count.
misses: u64Cumulative miss count.
evictions: u64Cumulative eviction count.
Implementations§
Source§impl PartitionStats
impl PartitionStats
Sourcepub fn utilisation(&self) -> f64
pub fn utilisation(&self) -> f64
Return the utilisation ratio used_bytes / max_bytes, clamped to
[0.0, 1.0].
Trait Implementations§
Source§impl Clone for PartitionStats
impl Clone for PartitionStats
Source§fn clone(&self) -> PartitionStats
fn clone(&self) -> PartitionStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PartitionStats
impl RefUnwindSafe for PartitionStats
impl Send for PartitionStats
impl Sync for PartitionStats
impl Unpin for PartitionStats
impl UnsafeUnpin for PartitionStats
impl UnwindSafe for PartitionStats
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more