stats on clean for removing roots (#16849)

* stats on clean for removing roots

* rename

* accumulate and swap metrics
This commit is contained in:
Jeff Washington (jwash)
2021-04-28 13:24:01 -05:00
committed by GitHub
parent 9218b51de7
commit 9070191b8b
2 changed files with 32 additions and 0 deletions

View File

@@ -347,6 +347,8 @@ pub struct AccountsIndexRootsStats {
pub uncleaned_roots_len: usize,
pub previous_uncleaned_roots_len: usize,
pub roots_range: u64,
pub rooted_cleaned_count: usize,
pub unrooted_cleaned_count: usize,
}
pub struct AccountsIndexIterator<'a, T> {
@@ -1251,6 +1253,8 @@ impl<T: 'static + Clone + IsCached + ZeroLamport> AccountsIndex<T> {
uncleaned_roots_len,
previous_uncleaned_roots_len,
roots_range,
rooted_cleaned_count: 0,
unrooted_cleaned_count: 0,
})
} else {
None