pub struct StatsDiff {Show 24 fields
pub num_nodes_diff: i64,
pub num_leaves_diff: i64,
pub num_internal_nodes_diff: i64,
pub tree_height_diff: i8,
pub total_key_value_pairs_diff: i64,
pub total_tree_size_bytes_diff: i64,
pub avg_node_size_bytes_diff: f64,
pub min_node_size_bytes_diff: i64,
pub max_node_size_bytes_diff: i64,
pub avg_entries_per_node_diff: f64,
pub avg_fanout_diff: f64,
pub min_fanout_diff: i64,
pub max_fanout_diff: i64,
pub avg_fill_factor_diff: f64,
pub avg_leaf_fill_factor_diff: f64,
pub avg_internal_fill_factor_diff: f64,
pub avg_key_size_bytes_diff: f64,
pub avg_value_size_bytes_diff: f64,
pub min_key_size_bytes_diff: i64,
pub max_key_size_bytes_diff: i64,
pub min_value_size_bytes_diff: i64,
pub max_value_size_bytes_diff: i64,
pub total_keys_size_bytes_diff: i64,
pub total_values_size_bytes_diff: i64,
}Expand description
Difference between two statistics objects
Contains the absolute difference for each numeric metric between two TreeStats objects.
Positive values indicate an increase, negative values indicate a decrease.
Created by calling TreeStats::diff.
§Example
use prolly::{Config, MemStore, Prolly};
let store = MemStore::new();
let prolly = Prolly::new(store, Config::default());
let tree1 = prolly.create();
let stats1 = prolly.collect_stats(&tree1).unwrap();
let mut tree2 = tree1.clone();
tree2 = prolly.put(&tree2, b"key".to_vec(), b"value".to_vec()).unwrap();
let stats2 = prolly.collect_stats(&tree2).unwrap();
let diff = stats2.diff(&stats1);
assert!(diff.num_nodes_diff > 0); // Tree grew
assert!(diff.total_key_value_pairs_diff > 0); // Added entriesFields§
§num_nodes_diff: i64§num_leaves_diff: i64§num_internal_nodes_diff: i64§tree_height_diff: i8§total_key_value_pairs_diff: i64§total_tree_size_bytes_diff: i64§avg_node_size_bytes_diff: f64§min_node_size_bytes_diff: i64§max_node_size_bytes_diff: i64§avg_entries_per_node_diff: f64§avg_fanout_diff: f64§min_fanout_diff: i64§max_fanout_diff: i64§avg_fill_factor_diff: f64§avg_leaf_fill_factor_diff: f64§avg_internal_fill_factor_diff: f64§avg_key_size_bytes_diff: f64§avg_value_size_bytes_diff: f64§min_key_size_bytes_diff: i64§max_key_size_bytes_diff: i64§min_value_size_bytes_diff: i64§max_value_size_bytes_diff: i64§total_keys_size_bytes_diff: i64§total_values_size_bytes_diff: i64Trait Implementations§
Source§impl<'de> Deserialize<'de> for StatsDiff
impl<'de> Deserialize<'de> for StatsDiff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for StatsDiff
Auto Trait Implementations§
impl Freeze for StatsDiff
impl RefUnwindSafe for StatsDiff
impl Send for StatsDiff
impl Sync for StatsDiff
impl Unpin for StatsDiff
impl UnsafeUnpin for StatsDiff
impl UnwindSafe for StatsDiff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more