chore: more debug info

This commit is contained in:
Zixuan Chen 2022-11-01 23:07:30 +08:00
parent b5370af5e9
commit dd2c2701c4
3 changed files with 14 additions and 6 deletions

View file

@ -17,8 +17,8 @@ deny:
crev:
cargo crev crate check
fuzz-yata-long:
cargo fuzz run yata -- -max_total_time=300 -max_len=4000 -jobs=2
fuzz-long TARGET:
cargo fuzz run {{TARGET}} -- -max_total_time=300 -max_len=4000 -jobs=2
quick-fuzz:
cargo fuzz run yata -- -max_total_time=10 -max_len=1000 &

View file

@ -2,11 +2,14 @@
//!
//!
mod iter;
use std::marker::PhantomPinned;
use std::{marker::PhantomPinned, ops::Range};
use fxhash::{FxHashMap, FxHashSet};
use rle::{HasLength, RleVec, RleVecWithIndex, Sliceable};
use rle::{
rle_tree::{node::Node, tree_trait::CumulateTreeTrait},
HasLength, RleVec, RleVecWithIndex, Sliceable,
};
use smallvec::SmallVec;
@ -468,4 +471,8 @@ fn size_of() {
println!("IdSpan {}", std::mem::size_of::<IdSpan>());
println!("ContainerID {}", std::mem::size_of::<ContainerID>());
println!("InternalString {}", std::mem::size_of::<InternalString>());
println!(
"Node<Range<u32>, Cumulated> {}",
std::mem::size_of::<Node<'static, Range<u32>, CumulateTreeTrait<Range<u32>, 8>>>()
);
}

View file

@ -387,11 +387,12 @@ impl<T: Rle, A: RleTreeTrait<T>> RleTree<T, A> {
pub fn debug_inspect(&mut self) {
println!(
"RleTree: \n- len={:?}\n- InternalNodes={}\n- LeafNodes={}\n- Elements={}",
"RleTree: \n- len={:?}\n- InternalNodes={}\n- LeafNodes={}\n- Elements={}\n- Bytes={}",
self.len(),
self.internal_node_num(),
self.leaf_node_num(),
self.elem_num()
self.elem_num(),
self.with_bump(|bump| bump.allocated_bytes())
);
}