pub struct ReclaimReport {
pub sweep: ObjectSweep,
pub kept_current: usize,
pub kept_recent: usize,
pub kept_ahead: usize,
pub kept_unrecognised: usize,
}Expand description
What one sweep_superseded pass did — and, for everything it kept, why.
The four kept_* counts exist because the retention rule keeps more than the
obvious class, and a summary that named only the obvious one would describe an
irreversible operation inaccurately. They partition ObjectSweep::retained:
each retained entry falls into exactly one, and their sum is that total.
Fields§
§sweep: ObjectSweepThe underlying pass: what was scanned, freed, and left on disk.
kept_current: usizeKept at this build’s own generation — the live set, the thing a sweep exists to not touch.
kept_recent: usizeKept at an older generation still inside the keep_generations
window. Unreachable by this build; deliberate insurance for the binary a
generation behind that shares this cache (see
DEFAULT_KEEP_GENERATIONS).
kept_ahead: usizeKept because it belongs to a generation ahead of this build — another worktree, or a colleague, running a newer binary against the same shared cache. Never swept, which is what stops two binaries of different ages taking turns deleting each other’s work.
kept_unrecognised: usizeKept because key_generation could not read a generation out of the key
at all. Doubt retains, always — but a non-zero count here is worth
investigating rather than absorbing into a total, because it is either a
format this build no longer writes or a bug in the parser, and both are
things a reader would want to know their cache is holding.
Implementations§
Source§impl ReclaimReport
impl ReclaimReport
Sourcepub fn kept_total(&self) -> usize
pub fn kept_total(&self) -> usize
The four kept_* counts summed — equal to ObjectSweep::retained.
Trait Implementations§
Source§impl Clone for ReclaimReport
impl Clone for ReclaimReport
Source§fn clone(&self) -> ReclaimReport
fn clone(&self) -> ReclaimReport
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 ReclaimReport
impl Debug for ReclaimReport
Source§impl Default for ReclaimReport
impl Default for ReclaimReport
Source§fn default() -> ReclaimReport
fn default() -> ReclaimReport
impl Eq for ReclaimReport
Source§impl PartialEq for ReclaimReport
impl PartialEq for ReclaimReport
Source§impl Serialize for ReclaimReport
impl Serialize for ReclaimReport
impl StructuralPartialEq for ReclaimReport
Auto Trait Implementations§
impl Freeze for ReclaimReport
impl RefUnwindSafe for ReclaimReport
impl Send for ReclaimReport
impl Sync for ReclaimReport
impl Unpin for ReclaimReport
impl UnsafeUnpin for ReclaimReport
impl UnwindSafe for ReclaimReport
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.