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
runtime/metrics: time histogram sub-bucket boundaries are wrong #50732
Comments
Change https://golang.org/cl/380094 mentions this issue: |
@gopherbot Please open backport issues for Go 1.16 and Go 1.17. This issues is not really possible to workaround because downstream users are supposed to take the reported bucketing for |
Backport issue(s) opened: #50733 (for 1.16), #50734 (for 1.17). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Yes! Thank you. |
Change https://go.dev/cl/384620 mentions this issue: |
Change https://go.dev/cl/384621 mentions this issue: |
There was an off-by-one error in the time histogram buckets calculation that caused the linear sub-buckets distances to be off by 2x. The fix was trivial, but in writing tests I realized there was a much simpler way to express the calculation for the histogram buckets, and took the opportunity to do that here. The new bucket calculation also fixes the bug. For #50732. Fixes #50734. Change-Id: Idae89986de1c415ee4e148f778e0e101ca003ade Reviewed-on: https://go-review.googlesource.com/c/go/+/380094 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> (cherry picked from commit 2e9dcb5) Reviewed-on: https://go-review.googlesource.com/c/go/+/384621 TryBot-Result: Gopher Robot <gobot@golang.org>
There was an off-by-one error in the time histogram buckets calculation that caused the linear sub-buckets distances to be off by 2x. The fix was trivial, but in writing tests I realized there was a much simpler way to express the calculation for the histogram buckets, and took the opportunity to do that here. The new bucket calculation also fixes the bug. For #50732. Fixes #50733. Change-Id: Idae89986de1c415ee4e148f778e0e101ca003ade Reviewed-on: https://go-review.googlesource.com/c/go/+/380094 Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> (cherry picked from commit 2e9dcb5) Reviewed-on: https://go-review.googlesource.com/c/go/+/384620
The reported buckets for time-related histograms in the
runtime/metrics
package have their linear sub-buckets boundaries' distances between each other off by a factor of two, because of an off-by-one error in the function that generates them. As a result, the reported bucketing scheme is somewhat nonsensical.The text was updated successfully, but these errors were encountered: