pub struct ObjectSweep {
pub scanned: usize,
pub retained: usize,
pub removed: usize,
pub retained_bytes: u64,
pub freed_bytes: u64,
pub raced: usize,
pub failed: usize,
pub skipped: usize,
}Expand description
What one ObjectCache::sweep pass did.
scanned is exactly retained + removed + raced + failed, and everything
under the root that is not an entry lands in skipped instead — so a sweep
that had nothing to do and a sweep that could not do it do not print the same
line.
Fields§
§scanned: usizeCache entries examined — every <shard>/<rest>.json under the root.
retained: usizeEntries retain kept.
removed: usizeEntries retain rejected and this pass deleted.
retained_bytes: u64Bytes still held by the retained entries.
freed_bytes: u64Bytes freed — the size of the removed entries before deletion.
raced: usizeRejected entries already gone when the delete ran: another process swept the same shared cache concurrently. Counted rather than raised, because two sweeps agreeing is the expected outcome, not a fault.
failed: usizeRejected entries that could not be deleted — a permission problem, or a platform that refuses to unlink a file another process holds open. Counted and reported rather than aborting: a sweep that stops at the first stuck file both reclaims less and says nothing about why.
skipped: usizeFiles under the root that are not entries: a .json.tmp.<pid>-<nanos>
from a ObjectCache::put still in flight, or anything a later format
puts here. Never shown to retain and never deleted — a sweep that
guesses at a name it does not recognise is a sweep that deletes another
process’s half-written work.
Trait Implementations§
Source§impl Clone for ObjectSweep
impl Clone for ObjectSweep
Source§fn clone(&self) -> ObjectSweep
fn clone(&self) -> ObjectSweep
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 ObjectSweep
impl Debug for ObjectSweep
Source§impl Default for ObjectSweep
impl Default for ObjectSweep
Source§fn default() -> ObjectSweep
fn default() -> ObjectSweep
impl Eq for ObjectSweep
Source§impl PartialEq for ObjectSweep
impl PartialEq for ObjectSweep
Source§impl Serialize for ObjectSweep
impl Serialize for ObjectSweep
impl StructuralPartialEq for ObjectSweep
Auto Trait Implementations§
impl Freeze for ObjectSweep
impl RefUnwindSafe for ObjectSweep
impl Send for ObjectSweep
impl Sync for ObjectSweep
impl Unpin for ObjectSweep
impl UnsafeUnpin for ObjectSweep
impl UnwindSafe for ObjectSweep
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.