add 'oldest_root' stat in hash calc (#26896)

This commit is contained in:
Jeff Washington (jwash) 2022-08-03 10:02:08 -05:00 committed by GitHub
parent 6706be0f56
commit 0732a6c45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -6886,6 +6886,8 @@ impl AccountsDb {
) -> Result<(Hash, u64), BankHashVerificationError> {
let _guard = self.active_stats.activate(ActiveStatItem::Hash);
stats.oldest_root = storages.range().start;
self.mark_old_slots_as_dirty(storages, Some(config.epoch_schedule.slots_per_epoch));
let (num_hash_scan_passes, bins_per_pass) = Self::bins_per_pass(self.num_hash_scan_passes);

View File

@ -94,6 +94,7 @@ pub struct HashStats {
pub rehash_required: AtomicUsize,
/// # rehashes that took place and were UNnecessary
pub rehash_unnecessary: AtomicUsize,
pub oldest_root: Slot,
pub roots_older_than_epoch: AtomicUsize,
pub accounts_in_roots_older_than_epoch: AtomicUsize,
pub append_vec_sizes_older_than_epoch: AtomicUsize,
@ -218,6 +219,7 @@ impl HashStats {
self.roots_older_than_epoch.load(Ordering::Relaxed) as i64,
i64
),
("oldest_root", self.oldest_root as i64, i64),
(
"ancient_append_vecs",
self.ancient_append_vecs.load(Ordering::Relaxed) as i64,