pub struct CacheSweep {
pub schema: &'static str,
pub budget_bytes: u64,
pub scanned: u64,
pub pinned: u64,
pub evicted: u64,
pub freed_bytes: u64,
pub retained_bytes: u64,
pub over_budget: bool,
pub generation: i64,
}Expand description
What one sweep of the cache tier did.
Reported in full — including what was kept and whether the tier is still over budget — because a sweep that silently declined to free anything and a sweep that had nothing to free look identical from the outside, and they mean opposite things.
Fields§
§schema: &'static strStable schema tag (CACHE_SCHEMA).
budget_bytes: u64The budget this sweep enforced.
scanned: u64Entries considered.
pinned: u64Entries that could not be evicted: written in the current generation with a valid anchor, or the most-recently-used entry, which is always kept.
evicted: u64Entries deleted.
freed_bytes: u64Bytes their deletion freed.
retained_bytes: u64Bytes still held after the sweep.
over_budget: boolWhether the tier is still over budget after the sweep — which happens when what remains is all pinned. Reported rather than hidden: a bound that silently fails to bind is worse than one that says so.
generation: i64The generation the tier advanced to. Entries written before it are evictable by the next sweep.
Trait Implementations§
Source§impl Clone for CacheSweep
impl Clone for CacheSweep
Source§fn clone(&self) -> CacheSweep
fn clone(&self) -> CacheSweep
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CacheSweep
impl Debug for CacheSweep
Source§impl Deserialize<'static> for CacheSweep
impl Deserialize<'static> for CacheSweep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
impl Eq for CacheSweep
Source§impl PartialEq for CacheSweep
impl PartialEq for CacheSweep
Source§impl Serialize for CacheSweep
impl Serialize for CacheSweep
impl StructuralPartialEq for CacheSweep
Auto Trait Implementations§
impl Freeze for CacheSweep
impl RefUnwindSafe for CacheSweep
impl Send for CacheSweep
impl Sync for CacheSweep
impl Unpin for CacheSweep
impl UnsafeUnpin for CacheSweep
impl UnwindSafe for CacheSweep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.