From b9db129b333fa506ec256f78b87736ea584db786 Mon Sep 17 00:00:00 2001 From: Antioch Peverell Date: Tue, 30 Apr 2019 20:27:37 +0100 Subject: [PATCH] Add debug logging on startup to provide size of our leaf_set (aka UTXO set) (#2788) --- store/src/leaf_set.rs | 8 ++++++++ store/src/prune_list.rs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/store/src/leaf_set.rs b/store/src/leaf_set.rs index b6646eb74b..7fe0616699 100644 --- a/store/src/leaf_set.rs +++ b/store/src/leaf_set.rs @@ -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(), diff --git a/store/src/prune_list.rs b/store/src/prune_list.rs index 60a7eb640f..e00b4f00d4 100644 --- a/store/src/prune_list.rs +++ b/store/src/prune_list.rs @@ -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(),