pub struct InnerNodeStats {
pub count: usize,
pub total_slots: usize,
pub sum_slots: usize,
pub total_header_bytes: usize,
pub sum_prefix_len_bytes: usize,
pub sum_capped_prefix_len_bytes: usize,
pub max_prefix_len_bytes: usize,
pub mem_usage: usize,
}
Expand description
Statistics for inner nodes
Fields§
§count: usize
The number of occurrences
total_slots: usize
The total number of slots in inner nodes
sum_slots: usize
The number of used slots in inner nodes
total_header_bytes: usize
Sum of all header prefix lengths
sum_prefix_len_bytes: usize
Sum of all used prefix length
sum_capped_prefix_len_bytes: usize
Sum of all used prefix length capped to the maximum number of bytes in the header
max_prefix_len_bytes: usize
Maximum prefix length in bytes
mem_usage: usize
Total memory usage in bytes
Implementations§
Source§impl InnerNodeStats
impl InnerNodeStats
fn aggregate_data<K, V, const PREFIX_LEN: usize, N>(&mut self, t: &N)where
N: InnerNode<PREFIX_LEN, Key = K, Value = V>,
Sourcepub fn free_slots(&self) -> usize
pub fn free_slots(&self) -> usize
How many free slots
Sourcepub fn percentage_slots(&self) -> f64
pub fn percentage_slots(&self) -> f64
Percentage of the maximum slots that is being used
Sourcepub fn avg_prefix_len(&self) -> f64
pub fn avg_prefix_len(&self) -> f64
The average prefix length
Sourcepub fn avg_capped_prefix_len(&self) -> f64
pub fn avg_capped_prefix_len(&self) -> f64
The average prefix length but capped to the header prefix length
Sourcepub fn free_header_bytes(&self) -> usize
pub fn free_header_bytes(&self) -> usize
The average prefix length but capped to the header prefix length
Sourcepub fn percentage_header_bytes(&self) -> f64
pub fn percentage_header_bytes(&self) -> f64
The average prefix length but capped to the header prefix length
Trait Implementations§
Source§impl Add for InnerNodeStats
impl Add for InnerNodeStats
Source§impl Clone for InnerNodeStats
impl Clone for InnerNodeStats
Source§fn clone(&self) -> InnerNodeStats
fn clone(&self) -> InnerNodeStats
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InnerNodeStats
impl Debug for InnerNodeStats
Source§impl Default for InnerNodeStats
impl Default for InnerNodeStats
Source§fn default() -> InnerNodeStats
fn default() -> InnerNodeStats
Returns the “default value” for a type. Read more
Source§impl Hash for InnerNodeStats
impl Hash for InnerNodeStats
Source§impl PartialEq for InnerNodeStats
impl PartialEq for InnerNodeStats
impl Copy for InnerNodeStats
impl Eq for InnerNodeStats
impl StructuralPartialEq for InnerNodeStats
Auto Trait Implementations§
impl Freeze for InnerNodeStats
impl RefUnwindSafe for InnerNodeStats
impl Send for InnerNodeStats
impl Sync for InnerNodeStats
impl Unpin for InnerNodeStats
impl UnwindSafe for InnerNodeStats
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