cockroachdb / cockroachdb/goodhistogram
pMax value is "quantized" and can be the same between similar sets of data, which looks suspicious
- Dominant language
- Go
- Stars
- 4
- Forks
- 2
- Avg merge
- 6d 48m
- Merged PRs (30d)
- 3
Description
See https://github.com/cockroachdb/goodhistogram/commit/95df80c00f07b74be7a4c46ece76c15fb9841bc8 for a reproduction.
```
var pmaxSampleParams = Params{Lo: 1_000, Hi: 10e9, ErrorBound: 0.10}
=== RUN TestPMaxQuantization
pmax_test.go:137: set A (n=38357)
pmax_test.go:138: exact estimated error
pmax_test.go:144: p50 0.072ms 0.072ms +0.3%
pmax_test.go:144: p90 0.485ms 0.481ms -0.9%
pmax_test.go:144: p99 8.843ms 9.080ms +2.7%
pmax_test.go:144: p99.9 16.059ms 16.558ms +3.1%
pmax_test.go:144: pMax 33.956ms 39.903ms +17.5%
pmax_test.go:137: set B (n=13355)
pmax_test.go:138: exact estimated error
pmax_test.go:144: p50 0.064ms 0.064ms +0.7%
pmax_test.go:144: p90 0.128ms 0.128ms +0.5%
pmax_test.go:144: p99 16.740ms 16.701ms -0.2%
pmax_test.go:144: p99.9 20.462ms 21.313ms +4.2%
pmax_test.go:144: pMax 34.440ms 39.903ms +15.9%
pmax_test.go:167: true maxima differ by 0.484ms but both report pMax=39.903ms
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pmax_test.go and the TestPMaxQuantization reproduction linked in the issue. Run the test using the shown Params and compare the exact maxima with the reported pMax values. Done means the expected behavior for distinct maxima is established and covered by regression testing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, prometheus
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100