[][src]Struct ternary_tree::Stats

pub struct Stats {
    pub dist: Vec<DistStat>,
    pub key_len: KeyLenStat,
    pub count: CountStat,
    pub bytes: BytesStat,
}

Contains various metrics describing the tree : its nodes, keys and values. Mostly used for tunning and debugging purpose.

  • dist[n].matches number of values reached by traversing n middle links (the number of key of lenght n)
  • dist[n].sides number of values reached by traversing n left or middle links (those links may indicate that the tree is not well balanced)
  • dist[n].depth number of values whose total depth (middle, left and right links) is n
  • key_len.min length of the shortest key inserted in the tree
  • key_len.max length of the longest key inserted in the tree
  • count.nodes total number of nodes in the tree
  • count.values number of nodes which store a value (same as len)
  • bytes.node byte size of a node (including the fixed size of a value, but excluding heap allocated memory of this value)
  • bytes.total total number of bytes allocated for nodes (count.nodes * bytes.node)

Fields

dist: Vec<DistStat>key_len: KeyLenStatcount: CountStatbytes: BytesStat

Trait Implementations

impl Default for Stats[src]

impl PartialEq<Stats> for Stats[src]

impl Debug for Stats[src]

Auto Trait Implementations

impl Send for Stats

impl Sync for Stats

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.