From 7615b064f02b4fec1503d0e1a19aee7b042a70ce Mon Sep 17 00:00:00 2001 From: Stephen Akridge Date: Thu, 6 Aug 2020 17:15:00 -0700 Subject: [PATCH] Accounts hash calculation metrics --- runtime/src/accounts_db.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 488ac4facec331..ae8963ad3cc4f2 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -1592,9 +1592,18 @@ impl AccountsDB { } scan.stop(); - debug!("{}", scan); - Ok(Self::accumulate_account_hashes(hashes)) + let mut accumulate = Measure::start("accumulate"); + let accumulated_hash = Self::accumulate_account_hashes(hashes); + accumulate.stop(); + datapoint_info!( + "update_accounts_hash", + "accounts_scan", + scan.as_us(), + "hash_accumulate", + accumulate.as_us(), + ); + Ok(accumulated_hash) } pub fn get_accounts_hash(&self, slot: Slot) -> Hash {