Skip to main content

TreeStats

Struct TreeStats 

pub struct TreeStats {
Show 27 fields pub blob_count: u32, pub total_space_used: u64, pub total_gap_space: u64, pub total_slots: u64, pub total_compactions: u64, pub total_tombstones: u64, pub total_blob_edges: u64, pub leaf_blob_count: u32, pub max_blob_depth: u32, pub total_blob_depth: u64, pub max_blob_fill_per_mille: u32, pub blobs: Vec<BlobStats>, pub bm_dirty_count: usize, pub bm_pending_delete_count: usize, pub bm_cache_hits: u64, pub bm_cache_misses: u64, pub bm_optimistic_restarts: u64, pub bm_range_restarts: u64, pub bm_walker_ops: u64, pub bm_walker_blob_hops: u64, pub bm_max_blob_hops: u64, pub bm_max_cross_blob_depth: u64, pub bm_spillovers: u64, pub bm_merges: u64, pub route_cache: RouteCacheStats, pub journal: Option<JournalStats>, pub checkpointer: Option<CheckpointerStats>,
}
Expand description

Tree-wide aggregate counters from Tree::stats.

blobs carries the per-blob breakdown in BFS order from the root; the totals are pre-summed for the common “how big is the tree?” question. All bytes / counts are sums over blobs.

Fields§

§blob_count: u32

Number of distinct blobs reachable from the tree root.

§total_space_used: u64

Sum of space_used over every blob.

§total_gap_space: u64

Sum of gap_space over every blob.

§total_slots: u64

Sum of num_slots over every blob.

§total_compactions: u64

Sum of compact_times over every blob (lifetime compactions across the whole tree).

§total_tombstones: u64

Sum of tombstone_leaf_cnt over every blob.

§total_blob_edges: u64

Sum of num_ext_blobs over every blob. In a tree-shaped blob graph this is the number of cross-blob edges.

§leaf_blob_count: u32

Number of reachable blobs with no installed BlobNode children.

§max_blob_depth: u32

Maximum cross-blob depth from the root blob. Root-only trees report 0.

§total_blob_depth: u64

Sum of per-blob depths, used to derive Self::avg_blob_depth.

§max_blob_fill_per_mille: u32

Highest data-area occupancy among reachable blobs, in per-mille units (1000 = full data area).

§blobs: Vec<BlobStats>

Per-blob breakdown in BFS order from the root.

§bm_dirty_count: usize

Number of blobs currently dirty in the BufferManager — modified in cache but not yet flushed to store. With the background checkpointer enabled this stays bounded by the checkpoint cadence; without it, it tracks the user’s explicit Tree::checkpoint schedule.

§bm_pending_delete_count: usize

Number of blobs queued for deferred store deletion — children unlinked by an erase walker’s SubtreeGone path or by a merge pass, waiting for the next checkpoint round (or Tree::checkpoint) to issue the actual store.delete_blob + manifest re-sync.

§bm_cache_hits: u64

Cumulative cache lookups served from BM cache without going to the inner store. Read by external observers to derive a hit rate (bm_cache_hits / (bm_cache_hits + bm_cache_misses)); higher is better.

§bm_cache_misses: u64

Cumulative cache lookups that fell through to inner_store.read_blob because the entry was absent or evicted. Tracks cold-start + eviction churn.

§bm_optimistic_restarts: u64

Cumulative wait-free read restarts in Tree::get — each one means a concurrent writer lapped an optimistic snapshot and the lookup walked the tree from scratch. Spikes here indicate writer/reader contention.

§bm_range_restarts: u64

Cumulative range-iterator cursor restarts. Each one means a range/list cursor detected a rewritten blob on its descent path and rebuilt from its monotonic lower bound.

§bm_walker_ops: u64

Cumulative mutation walker invocations (insert_multi / erase_multi). rename and atomic count their inner walker calls separately.

§bm_walker_blob_hops: u64

Total blob hops across mutation walker invocations. Divide by Self::bm_walker_ops for the average.

§bm_max_blob_hops: u64

Maximum blob hops observed for one mutation walker call.

§bm_max_cross_blob_depth: u64

Largest key-depth at which a mutation walker entered a blob. This is a cross-blob boundary-depth signal, not a full per-node ART-depth trace.

§bm_spillovers: u64

Successful foreground spillover events.

§bm_merges: u64

BlobNode children folded back into parents by manual compact or background merge passes.

§route_cache: RouteCacheStats

Root route-cache counters for large path-shaped trees.

§journal: Option<JournalStats>

WAL/journal worker counters, or None for memory trees and caller-supplied stores opened without holt’s WAL.

§checkpointer: Option<CheckpointerStats>

Background checkpointer telemetry, or None if the bg thread group isn’t running (the default; opt in via crate::CheckpointConfig::enabled).

Implementations§

§

impl TreeStats

pub fn bm_avg_blob_hops(&self) -> f64

Average blob hops per mutation walker invocation.

pub fn avg_blob_depth(&self) -> f64

Average cross-blob graph depth across reachable blobs.

pub fn leaf_blob_ratio(&self) -> f64

Fraction of reachable blobs that are leaves in the blob graph.

pub fn avg_blob_fill_ratio(&self) -> f64

Average data-area occupancy across reachable blobs.

pub fn max_blob_fill_ratio(&self) -> f64

Maximum data-area occupancy among reachable blobs.

Trait Implementations§

§

impl Clone for TreeStats

§

fn clone(&self) -> TreeStats

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
§

impl Debug for TreeStats

§

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

Formats the value using the given formatter. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.