Skip to content

Commit

Permalink
Revert "metrics on rent partitions (solana-labs#19728)"
Browse files Browse the repository at this point in the history
This reverts commit bcaf9cb.
  • Loading branch information
frits-metalogix authored Nov 24, 2021
1 parent 9162b3d commit d0a8a7b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions runtime/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3864,18 +3864,10 @@ impl Bank {
}

let mut measure = Measure::start("collect_rent_eagerly-ms");
let partitions = self.rent_collection_partitions();
let count = partitions.len();
let account_count: usize = partitions
.into_iter()
.map(|partition| self.collect_rent_in_partition(partition))
.sum();
for partition in self.rent_collection_partitions() {
self.collect_rent_in_partition(partition);
}
measure.stop();
datapoint_info!(
"collect_rent_eagerly",
("accounts", account_count, i64),
("partitions", count, i64)
);
inc_new_counter_info!("collect_rent_eagerly-ms", measure.as_ms() as usize);
}

Expand Down Expand Up @@ -3912,7 +3904,7 @@ impl Bank {
}
}

fn collect_rent_in_partition(&self, partition: Partition) -> usize {
fn collect_rent_in_partition(&self, partition: Partition) {
let subrange = Self::pubkey_range_from_partition(partition);

let accounts = self
Expand Down Expand Up @@ -3942,7 +3934,8 @@ impl Bank {
}
self.collected_rent.fetch_add(total_rent, Relaxed);
self.rewards.write().unwrap().append(&mut rent_debits.0);
account_count

datapoint_info!("collect_rent_eagerly", ("accounts", account_count, i64));
}

// Mostly, the pair (start_index & end_index) is equivalent to this range:
Expand Down

0 comments on commit d0a8a7b

Please sign in to comment.