Skip to content

Commit

Permalink
collect storage_read_elapsed for shrink and ancient (solana-labs#28833)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored and gnapoli23 committed Dec 16, 2022
1 parent 714f31c commit 9624cc0
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3805,11 +3805,17 @@ impl AccountsDb {
where
I: Iterator<Item = &'a Arc<AccountStorageEntry>>,
{
let GetUniqueAccountsResult {
stored_accounts: stored_accounts_temp,
original_bytes,
store_ids,
} = self.get_unique_accounts_from_storages(stores);
let (
GetUniqueAccountsResult {
stored_accounts: stored_accounts_temp,
original_bytes,
store_ids,
},
storage_read_elapsed,
) = measure!(self.get_unique_accounts_from_storages(stores));
stats
.storage_read_elapsed
.fetch_add(storage_read_elapsed.as_us(), Ordering::Relaxed);
*stored_accounts = stored_accounts_temp;

let mut index_read_elapsed = Measure::start("index_read_elapsed");
Expand Down

0 comments on commit 9624cc0

Please sign in to comment.