Skip to content

Commit

Permalink
HistogramCollector format cleanup (#15753)
Browse files Browse the repository at this point in the history
## Description 

Describe the changes or additions included in this PR.

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
halfprice authored and wlmyng committed Jan 18, 2024
1 parent 385b096 commit c7e8d5c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/mysten-metrics/src/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ impl HistogramCollector {
const MAX_POINTS: usize = 500_000;
loop {
tokio::select! {
_ = &mut timeout => {
break;
},
_ = &mut timeout => break,
point = self.channel.recv() => {
count += 1;
if count > MAX_POINTS {
Expand All @@ -239,8 +237,8 @@ impl HistogramCollector {
// Histogram no longer exists
return Err(());
}
}
}
},
}
}
if count > MAX_POINTS {
error!(
Expand Down

0 comments on commit c7e8d5c

Please sign in to comment.