Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add few more metrics data points #19624

Merged
merged 5 commits into from
Sep 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
collapse multiple sum()s into one liner
  • Loading branch information
tao-stones committed Sep 14, 2021
commit 371fe0c8efe2886f53b9930fe1d10211cdd84388
17 changes: 11 additions & 6 deletions core/src/progress_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,17 @@ impl ReplaySlotStats {
.iter()
.collect();
per_pubkey_timings.sort_by(|a, b| b.1.accumulated_us.cmp(&a.1.accumulated_us));
let total_us: u64 = per_pubkey_timings.iter().map(|a| a.1.accumulated_us).sum();
let total_units: u64 = per_pubkey_timings
.iter()
.map(|a| a.1.accumulated_units)
.sum();
let total_count: u32 = per_pubkey_timings.iter().map(|a| a.1.count).sum();
let (total_us, total_units, total_count) =
per_pubkey_timings
.iter()
.fold((0, 0, 0), |(sum_us, sum_units, sum_count), a| {
(
sum_us + a.1.accumulated_us,
sum_units + a.1.accumulated_units,
sum_count + a.1.count,
)
});

for (pubkey, time) in per_pubkey_timings.iter().take(5) {
datapoint_info!(
"per_program_timings",
Expand Down