Skip to content

Added default first hist bucket if needed#532

Merged
tsenart merged 1 commit intotsenart:masterfrom
yonatang:default_first_hist_bucket
Jul 16, 2020
Merged

Added default first hist bucket if needed#532
tsenart merged 1 commit intotsenart:masterfrom
yonatang:default_first_hist_bucket

Conversation

@yonatang
Copy link
Contributor

Background

Fixes #522

When reporting hist with buckets that doesn't start with 0, any requests that won't fit the first bucket will fall into the last bucket, skewing the results. Please see discussion in issue #522 .

This PR will check if the first bucket starts with 0. If not, it will create a default bucket for such cases. For example, this input
-hist[5ms,10ms,1s] will generate the following buckets: [0,5ms], [5ms,10ms], [10ms,1s], [1s,+Inf] (and not [5ms,10ms], [10ms,1s], [1s,+Inf])

Checklist

  • Git commit messages conform to community standards.
  • Each Git commit represents meaningful milestones or atomic units of work.
  • Changed or added code is covered by appropriate tests.

@yonatang yonatang requested review from tsenart and xla as code owners July 15, 2020 16:39
@yonatang yonatang force-pushed the default_first_hist_bucket branch from a4b68ef to 313a60a Compare July 15, 2020 16:44
@tsenart tsenart merged commit 83a3ce9 into tsenart:master Jul 16, 2020
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.

Wrong data in report -type hist

2 participants