Skip to main content

GcStats

Struct GcStats 

Source
pub struct GcStats {
Show 16 fields pub entries_evicted: usize, pub bytes_freed: u64, pub blobs_removed: usize, pub duration_ms: u64, pub skipped: bool, pub entries_pinned: usize, pub entries_unreclaimable: usize, pub disk_bytes_reclaimed: u64, pub entries_failed: usize, pub entries_locked: usize, pub entries_busy_snapshot: usize, pub entries_recent_prefiltered: usize, pub entries_import_pinned: usize, pub evict_write_ms: u64, pub bytes_held: u64, pub housekeeping: Option<HousekeepingStats>,
}
Expand description

Statistics returned by GC operations.

Fields§

§entries_evicted: usize§bytes_freed: u64

Store-namespace bytes whose blob rows went away. Not filesystem reclamation — clones in target/ can keep the blocks.

§blobs_removed: usize§duration_ms: u64§skipped: bool§entries_pinned: usize

Entries eviction selected but could not remove because they were accessed within EVICTION_IDLE_GRACE — a live build may be mid-restore on them (#326, #182) — or have a durable remote-upload intent whose local payload must survive until that intent is retired.

Recorded so the CLI can explain “evicted 0” while the store is over its limit. Without it that reads as “GC is broken”, which is what #509 was filed about and plausibly what turned #497 into a 113 GB bug report.

§entries_unreclaimable: usize

Entries eviction selected but left in place because unlinking their last-ref blobs would not free disk (hardlink or CoW clone still live in a worktree). Distinct from Self::entries_pinned.

§disk_bytes_reclaimed: u64

Best-effort private bytes actually returned by unlinking store names.

§entries_failed: usize

Entries eviction selected but failed to remove: an unreadable meta.json (#276), a SQLite error. Counted rather than only logged, so a sweep that keeps failing shows up in its own stats instead of only as warning lines nobody reads.

§entries_locked: usize

The part of Self::entries_failed that was SQLite write contention (SQLITE_BUSY / SQLITE_LOCKED): the sweep lost the write lock to live builds, as opposed to finding a damaged entry.

§entries_busy_snapshot: usize

Failed evictions caused by upgrading a stale WAL read snapshot to a writer. These fail immediately and cannot be cured by busy_timeout.

§entries_recent_prefiltered: usize

Recently accessed candidates skipped before loading metadata or starting a SQLite transaction. Included in entries_pinned.

§entries_import_pinned: usize

Candidates an automatic sweep kept because the remote delivered them within IMPORT_PIN (#1008). Included in entries_pinned.

§evict_write_ms: u64

Time spent in the eviction writes themselves, each entry’s removal with its busy waits, summed over the run. Next to entries_locked it shows how much of a sweep went to waiting on builds for the index write lock.

§bytes_held: u64

Bytes a size-driven sweep found held by live files outside the store: last-reference blobs a target directory still clones or hardlinks. Evicting them frees nothing, so the sweep leaves them out of the bytes it has to free (kunobi-ninja/kache#1206).

§housekeeping: Option<HousekeepingStats>

What the run’s housekeeping did. None for a run that did none, such as the eviction after an upload.

Trait Implementations§

Source§

impl Clone for GcStats

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GcStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GcStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GcStats

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GcStats

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more