Simple sum tree benchmark

This commit is contained in:
Ignotus Peverell
2017-07-23 01:19:10 +00:00
parent 87fc062f9b
commit 22f3d42b94
2 changed files with 77 additions and 2 deletions
+2 -2
View File
@@ -653,7 +653,7 @@ where
}
#[allow(dead_code)]
fn print_tree<T>(tree: &SumTree<T>)
pub fn print_tree<T>(tree: &SumTree<T>)
where
T: Summable + Writeable,
T::Sum: std::fmt::Debug,
@@ -848,7 +848,7 @@ mod test {
assert_eq!(tree.root_sum(), Some((expected, 28 + 0x1000)));
assert_eq!(tree.root_sum(), compute_root(elems[0..8].iter()));
assert_eq!(tree.unpruned_len(), 8);
prune!(prune, tree, elems[7]);
prune!(prune, tree, elems[7]);
// If we weren't pruning, try changing some elements
if !prune {