Aggregate purge and shrink metrics (#14763)

Co-authored-by: Carl Lin <carl@solana.com>
This commit is contained in:
carllin
2021-01-27 01:39:47 -08:00
committed by GitHub
parent daddcd361a
commit 72f10f5f29
3 changed files with 489 additions and 232 deletions

View File

@@ -70,6 +70,11 @@ impl SlotCacheInner {
pub fn is_frozen(&self) -> bool {
self.is_frozen.load(Ordering::SeqCst)
}
pub fn total_bytes(&self) -> u64 {
self.unique_account_writes_size.load(Ordering::Relaxed)
+ self.same_account_writes_size.load(Ordering::Relaxed)
}
}
impl Deref for SlotCacheInner {