Skip to content

Commit

Permalink
Add debug logging on startup to provide size of our leaf_set (aka UTX…
Browse files Browse the repository at this point in the history
…O set) (#2788)
  • Loading branch information
antiochp authored and ignopeverell committed Apr 30, 2019
1 parent 6352780 commit b9db129
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions store/src/leaf_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ impl LeafSet {
Bitmap::create()
};

if !bitmap.is_empty() {
debug!(
"bitmap {} pos ({} bytes)",
bitmap.cardinality(),
bitmap.get_serialized_size_in_bytes(),
);
}

Ok(LeafSet {
path: file_path.to_path_buf(),
bitmap_bak: bitmap.clone(),
Expand Down
2 changes: 1 addition & 1 deletion store/src/prune_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl PruneList {
prune_list.init_caches();

if !prune_list.bitmap.is_empty() {
debug!("prune_list: bitmap {} pos ({} bytes), pruned_cache {} pos ({} bytes), shift_cache {}, leaf_shift_cache {}",
debug!("bitmap {} pos ({} bytes), pruned_cache {} pos ({} bytes), shift_cache {}, leaf_shift_cache {}",
prune_list.bitmap.cardinality(),
prune_list.bitmap.get_serialized_size_in_bytes(),
prune_list.pruned_cache.cardinality(),
Expand Down

0 comments on commit b9db129

Please sign in to comment.