mirror of
https://github.com/loro-dev/loro.git
synced 2024-12-04 05:29:48 +00:00
chore: more debug info
This commit is contained in:
parent
b5370af5e9
commit
dd2c2701c4
3 changed files with 14 additions and 6 deletions
|
@ -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 &
|
||||
|
|
|
@ -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>>>()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue