Conversation
8cca7a6 to
5649552
Compare
fe878d0 to
fa282f3
Compare
gabotechs
commented
Mar 11, 2026
| ($name:ident, $percentile:expr) => { | ||
| #[derive(Clone)] | ||
| pub struct $name { | ||
| inner: Arc<Mutex<DDSketch>>, |
Collaborator
Author
There was a problem hiding this comment.
I don't love having a mutex here, but I've created some microbenchmarks in a separate branch (that I don't think are worth committing to the repo) to make sure this is the fastest approach vs other options like Atomic-based time buckets, and it actually is, so keeping this.
jayshrivastava
approved these changes
Mar 12, 2026
| let max_latency = MetricBuilder::new(metrics).max_latency("network_latency_max"); | ||
| let avg_latency = MetricBuilder::new(metrics).avg_latency("network_latency_avg"); | ||
| let p50_latency = MetricBuilder::new(metrics).avg_latency("network_latency_p50"); | ||
| let p95_latency = MetricBuilder::new(metrics).avg_latency("network_latency_p95"); |
Collaborator
There was a problem hiding this comment.
Typo. These should be p50_latency and p95_latency
Collaborator
Author
There was a problem hiding this comment.
Fixed now, thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds some percentile latency metrics that are more suitable for observing network latencies.