prometheus/promql
George Krajcsovits dc7b282d39
engine_test: adjust and comment histogram sample counts (#13841)
The size of histogram points are now bigger by 24 bytes due to the
custom values slice.

When histograms are loaded into partial results in vector selectors
we use HPoint type where the size is calculated as
(size of histogram + 8 for timestamp)/16.
a3d1a46eda/promql/value.go (L176)

When histograms are put into Sample type in range evaluations, the
Sample has more overhead and the size is calculated differently:
(size of histogram / 16) + 1 for time stamp.
a3d1a46eda/promql/engine.go (L1928)

When the size of the histogram is 16k, then the first calculation gives k
but the second gives k+1 for the sample count.
If the histogram size is 16k+8, then both would give k+1.

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2024-03-27 18:19:14 +01:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser Merge branch 'main' into nhcb 2024-03-22 14:51:48 +01:00
testdata promql: Fix limiting of extrapolation to negative values 2024-03-07 01:20:33 +01:00
bench_test.go Proposal to improve FPointSlice and HPointSlice allocation. (#13448) 2024-02-01 16:22:38 +00:00
engine.go Merge branch 'main' into nhcb 2024-03-22 14:51:48 +01:00
engine_test.go engine_test: adjust and comment histogram sample counts (#13841) 2024-03-27 18:19:14 +01:00
functions.go Merge branch 'main' into nhcb 2024-03-22 14:51:48 +01:00
functions_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
fuzz.go promql: fuzz test needs symbol table for parser 2024-02-26 11:45:25 +00:00
fuzz_test.go remove obsolete build tag 2024-01-17 22:26:32 +08:00
promql_test.go sort_by_label: Switch to feature flag 2023-11-28 15:10:12 +01:00
quantile.go Move from golang.org/x/exp/slices into slices now that we only support Go >= 1.21 2024-02-28 14:54:53 +01:00
quantile_test.go PromQL: ignore small errors for bucketQuantile (#13153) 2023-11-25 00:05:38 +01:00
query_logger.go add Close for ActiveQueryTracker to close the file. 2023-04-14 14:43:23 +08:00
query_logger_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
test.go sort_by_label: Switch to feature flag 2023-11-28 15:10:12 +01:00
test_test.go Add context argument to Querier.Select (#12660) 2023-09-12 12:37:38 +02:00
value.go Optimize histogram iterators (#13340) 2024-01-23 17:02:14 +01:00
value_test.go Shortcut ContainsSameLabelset() (#11000) 2022-07-13 15:18:10 +05:30