pub struct TreeStats {
pub node4: InnerNodeStats,
pub node16: InnerNodeStats,
pub node48: InnerNodeStats,
pub node256: InnerNodeStats,
pub tree: InnerNodeStats,
pub leaf: LeafStats,
}
Expand description
Collection of stats about the number of nodes types present in a tree
Fields§
§node4: InnerNodeStats
Stats for InnerNode4
s
node16: InnerNodeStats
Stats for InnerNode16
s
node48: InnerNodeStats
Stats for InnerNode48
s
node256: InnerNodeStats
Stats for InnerNode256
s
tree: InnerNodeStats
Stats for the whole tree
leaf: LeafStats
Number of LeafNode
s present in the
tree.
Implementations§
Source§impl TreeStats
impl TreeStats
Sourcepub fn total_memory_usage(&self) -> usize
pub fn total_memory_usage(&self) -> usize
Total memory usage of the tree (inner nodes + leaf)
Sourcepub fn bytes_per_entry(&self) -> f64
pub fn bytes_per_entry(&self) -> f64
Bytes used per entry in the tree (only inner node memory usage)
Sourcepub fn bytes_per_entry_with_leaf(&self) -> f64
pub fn bytes_per_entry_with_leaf(&self) -> f64
Bytes used per entry in the tree (total memory usage)
Trait Implementations§
impl Copy for TreeStats
impl Eq for TreeStats
impl StructuralPartialEq for TreeStats
Auto Trait Implementations§
impl Freeze for TreeStats
impl RefUnwindSafe for TreeStats
impl Send for TreeStats
impl Sync for TreeStats
impl Unpin for TreeStats
impl UnwindSafe for TreeStats
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
Mutably borrows from an owned value. Read more