Struct redb::DatabaseStats
source · pub struct DatabaseStats { /* private fields */ }
Expand description
Informational storage stats about the database
Implementations§
source§impl DatabaseStats
impl DatabaseStats
sourcepub fn tree_height(&self) -> usize
pub fn tree_height(&self) -> usize
Maximum traversal distance to reach the deepest (key, value) pair, across all tables
sourcepub fn allocated_pages(&self) -> usize
pub fn allocated_pages(&self) -> usize
Number of pages allocated
sourcepub fn leaf_pages(&self) -> usize
pub fn leaf_pages(&self) -> usize
Number of leaf pages that store user data
sourcepub fn branch_pages(&self) -> usize
pub fn branch_pages(&self) -> usize
Number of branch pages in btrees that store user data
sourcepub fn stored_bytes(&self) -> usize
pub fn stored_bytes(&self) -> usize
Number of bytes consumed by keys and values that have been inserted. Does not include indexing overhead
sourcepub fn metadata_bytes(&self) -> usize
pub fn metadata_bytes(&self) -> usize
Number of bytes consumed by keys in internal branch pages, plus other metadata
sourcepub fn fragmented_bytes(&self) -> usize
pub fn fragmented_bytes(&self) -> usize
Number of bytes consumed by fragmentation, both in data pages and internal metadata tables