prometheus/promql
beorn7 aa82fe198f tsdb: Fix histogram validation
So far, `ValidateHistogram` would not detect if the count did not
include the count in the zero bucket. This commit fixes the problem
and updates all the tests that have been undetected offenders so far.

Note that this problem would only ever create false negatives, so we
never falsely rejected to store a histogram because of it.

On the other hand, `ValidateFloatHistogram` has been to strict with
the count being at least as large as the sum of the counts in all the
buckets. Float precision issues could create false positives here, see
products of PromQL evaluations, it's actually quite hard to put an
upper limit no the floating point imprecision. Users could produce the
weirdest expressions, maxing out float precision problems. Therefore,
this commit simply removes that particular check from
`ValidateFloatHistogram`.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-08-22 23:04:01 +02:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser enhance histogram_quantile to get min/max value 2023-07-12 04:29:54 +08:00
testdata Drop metric name for "atan2" binary operator 2023-07-24 14:36:02 +02:00
bench_test.go Address PR feedback: clarify comment 2023-08-02 11:48:34 +10:00
engine_test.go tsdb: Fix histogram validation 2023-08-22 23:04:01 +02:00
engine.go Merge pull request #12682 from bboreham/contains-same-label-set 2023-08-14 14:12:47 +01:00
functions_test.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
functions.go enhance histogram_quantile to get min/max value 2023-07-12 04:29:54 +08:00
fuzz_test.go error for invalid media type should not be completely swallowed (#10186) 2022-02-08 10:57:56 +01:00
fuzz.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
promql_test.go promql: allow tests to be imported (#12050) 2023-08-18 20:48:59 +02:00
quantile.go histograms: Improve comment 2023-07-12 14:52:49 +02:00
query_logger_test.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
query_logger.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
test_test.go promql: Separate Point into FPoint and HPoint 2023-04-13 19:25:16 +02:00
test.go promql: allow tests to be imported (#12050) 2023-08-18 20:48:59 +02:00
value_test.go Shortcut ContainsSameLabelset() (#11000) 2022-07-13 15:18:10 +05:30
value.go remove repetitive words (#12556) 2023-07-13 15:53:40 +02:00