Skip to content

Commit

Permalink
Tiny tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
josephg committed Mar 18, 2024
1 parent 73bb958 commit 06e7ebe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/content-tree/src/root.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(clippy::needless_lifetimes)] // Clippy doesn't understand the need for some lifetimes below

use std::mem::size_of;
use std::mem::{align_of, size_of};

use humansize::{file_size_opts, FileSize};
use smallvec::SmallVec;
Expand Down Expand Up @@ -350,11 +350,11 @@ impl<E: ContentTraits, I: TreeMetrics<E>, const IE: usize, const LE: usize> Cont

if detailed {
println!("Entry distribution {:?}", size_counts);
println!("Internal node size {}", std::mem::size_of::<NodeInternal<E, I, IE, LE>>());
println!("Internal node size {}", size_of::<NodeInternal<E, I, IE, LE>>());
println!("Node entry size {} alignment {}",
std::mem::size_of::<Option<Node<E, I, IE, LE>>>(),
std::mem::align_of::<Option<Node<E, I, IE, LE>>>());
println!("Leaf size {}", std::mem::size_of::<NodeLeaf<E, I, IE, LE>>());
size_of::<Option<Node<E, I, IE, LE>>>(),
align_of::<Option<Node<E, I, IE, LE>>>());
println!("Leaf size {}", size_of::<NodeLeaf<E, I, IE, LE>>());
}
}

Expand Down
2 changes: 2 additions & 0 deletions examples/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,6 @@ fn main() {
// profile_merge("clownschool", 500);
// profile_merge("git-makefile", 200);
profile_merge("git-makefile", 1);
// profile_merge("node_nodecc", 1);
// profile_merge("clownschool", 1);
}

0 comments on commit 06e7ebe

Please sign in to comment.