From 673a38c89219f90b9ed213df40df6e0cafd17f69 Mon Sep 17 00:00:00 2001 From: HaoranYi Date: Tue, 17 Oct 2023 15:20:29 -0500 Subject: [PATCH] move timer after early exit (#33732) Co-authored-by: HaoranYi --- accounts-db/src/accounts_db.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts-db/src/accounts_db.rs b/accounts-db/src/accounts_db.rs index f04933b47df0a8..f4d4b665c3689c 100644 --- a/accounts-db/src/accounts_db.rs +++ b/accounts-db/src/accounts_db.rs @@ -4554,10 +4554,11 @@ impl AccountsDb { /// Combine all account data from storages in 'sorted_slots' into ancient append vecs. /// This keeps us from accumulating append vecs for each slot older than an epoch. fn combine_ancient_slots(&self, sorted_slots: Vec, can_randomly_shrink: bool) { - let mut total = Measure::start("combine_ancient_slots"); if sorted_slots.is_empty() { return; } + + let mut total = Measure::start("combine_ancient_slots"); let mut guard = None; // the ancient append vec currently being written to