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

Configurable range for histogram buckets for latency metrics #3382

Merged
merged 16 commits into from
Jun 14, 2023

Conversation

ljoss17
Copy link
Contributor

@ljoss17 ljoss17 commented May 31, 2023

Closes: #3366

Description

This PR adds 2 new configurations:

  • submitted_range used to specify the range of the histogram
    buckets for the tx_latency_submitted metric.
  • confirmed_range used to specify the range of the histogram
    buckets for the tx_latency_confirmed metric.

Allowing the buckets to be changed without the need to recompile Hermes


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@ljoss17 ljoss17 requested review from romac and ancazamfir May 31, 2023 09:43
@ljoss17 ljoss17 marked this pull request as ready for review May 31, 2023 09:44
}
}
}

#[derive(Debug)]
struct CustomAggregatorSelector;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the previous aggregator selector ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

}

pub fn get_submitted_range(&self) -> Vec<f64> {
let step = (self.tx_latency_submitted_max - self.tx_latency_submitted_min) / 10;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the number of buckets to be configurable also ?

Copy link
Member

@romac romac May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes good idea!

config.toml Outdated Show resolved Hide resolved
@romac romac merged commit 2732541 into master Jun 14, 2023
@romac romac deleted the luca_joss/metrics-quantile-histogram-buckets branch June 14, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt buckets for latency metrics to better reflect production numbers
3 participants