Björn Rabenstein
125a90899c
promqltest: Complete the tests for info annotations ( #15429 )
...
promqltest: Complete the tests for info annotations
So far, we did not test for the _absence_ of an info annotation
(because many tests triggered info annotations, which we haven't taken
into account so far).
The test for info annotations was also missed for range queries.
This completes the tests for info annotations (and refactors the many
`if` statements into a somewhat more compact `switch` statement).
It fixes most tests to not emit an info annotation anymore. Or it
changes the `eval` to `eval_info` where we actually want to test for
the info annotation.
It also fixes a few spelling errors in comments.
---------
Signed-off-by: beorn7 <beorn@grafana.com>
Signed-off-by: Björn Rabenstein <github@rabenste.in>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2024-11-21 14:20:38 +01:00
Joshua Hesketh
ed2668bbda
Merge branch 'main' into jhesketh/clamp
...
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
2024-11-12 10:20:58 +11:00
Joshua Hesketh
14ef1ce8ab
Round function should ignore native histograms
...
As per the documentation, native histograms are skipped. This is in line with other simpleFunc's.
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
2024-10-17 15:39:48 +11:00
Joshua Hesketh
31d19381f6
Clamp functions should ignore native histograms
...
As per the documentation, native histograms are skipped. This is in line
with other `simpleFunc`'s.
Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
2024-10-16 15:10:54 +11:00
Jan Fajerski
96e5a94d29
promql: rename holt_winters to double_exponential_smoothing
...
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-09-19 15:29:01 +02:00
Jan Fajerski
00315ce15e
Merge branch 'main' into 3.0-main-sync-24-08-30
...
using -Xours
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-09-02 11:27:18 +02:00
Jan Fajerski
7c8c748399
promql tests: adjust range query intervals
...
Some test queries need their interval adjusted to account for
https://github.com/prometheus/prometheus/pull/13904 . Otherwise the
queries don't return enough samples.
promql/engine_test.go:TestHistogramCopyFromIteratorRegression needed the
same, but also the result needed a fix since `increase` interpolates
over the full range.
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-08-21 12:33:52 +02:00
Jan Fajerski
5138922b0d
Merge branch 'main' into 3.0-main-sync-24-08-21
2024-08-21 09:09:36 +02:00
suntala
fd2f44af7f
Fall back to comparing by label set when sorting by label desc
...
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
2024-08-11 21:44:03 +02:00
suntala
94ad489328
Fall back to comparing by label set when sorting by label
...
Co-authored-by: Aleks Fazlieva <britishrum@users.noreply.github.com>
Signed-off-by: suntala <arati.rana@grafana.com>
2024-08-11 21:44:03 +02:00
Björn Rabenstein
ee5bba07c0
Merge pull request #14413 from prometheus/beorn7/promql
...
promql: more Kahan summation (avg) and less incremental mean calculation (avg, avg_over_time)
2024-08-06 19:56:32 +02:00
Jan Fajerski
adf5d6bce1
Merge branch 'main' into 3.0-main-sync-24-07-18
...
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
Conflicts:
VERSION
pick 3.0.0
promql/promqltest/testdata/histograms.test
pick changes from c39776c5b5
,
but adjust 5m range selectors to 10m to account for
https://github.com/prometheus/prometheus/pull/13904 .
Fixes:
promql/promqltest/testdata/functions.test
promql/promqltest/testdata/staleness.test
Tests added in https://github.com/prometheus/prometheus/pull/9138
need to be adjusted to account for
https://github.com/prometheus/prometheus/pull/13904 .
2024-07-18 15:56:40 +02:00
beorn7
cff0429b1a
promql: make avg_over_time faster and more precise
...
Same idea as for the avg aggregator before: Most of the time, there is
no overflow, so we don't have to revert to the more expensive and less
precise incremental calculation of the mean value.
Signed-off-by: beorn7 <beorn@grafana.com>
2024-07-10 19:20:24 +02:00
darshanime
cfad8ff3b2
Deprecate duration token
...
Signed-off-by: darshanime <deathbullet@gmail.com>
2024-07-10 15:49:58 +02:00
darshanime
8c8860d2d6
Allow number literals as duration
...
Signed-off-by: darshanime <deathbullet@gmail.com>
2024-07-10 15:49:30 +02:00
Jan Fajerski
b4152309a4
Merge branch 'main' into 3.0-main-sync
...
Conflicts:
promql/engine_test.go
Resolved by picking main changes but adjusting total_samples for
query "max_over_time(metricWith1HistogramEvery10Seconds[60s])[20s:5s]"
to 312. Via https://github.com/prometheus/prometheus/pull/13662 this
histogram now stores 13 values per timestamp, but via
https://github.com/prometheus/prometheus/pull/13904 the range query
is now left-open.
promql/promqltest/testdata/functions.test
Resolved by picking changes in main. See also
https://github.com/prometheus/prometheus/pull/13662 , but adjust some
range selectors (`s/1m/2m/`) to account for
https://github.com/prometheus/prometheus/pull/13904 .
promql/promqltest/testdata/histograms.test
Resolved by picking changes in main. See also
https://github.com/prometheus/prometheus/pull/13662 , but adjust some
range selectors (`s/5m/10m/`) to account for
https://github.com/prometheus/prometheus/pull/13904 .
Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
2024-07-03 09:45:25 +02:00
Jeanette Tan
dda5f48c9e
Merge branch 'main' into nhcb-review-2
2024-06-20 22:50:00 +08:00
Zhang Zhanpeng
debbdb8608
make matrix selection and lookback left-open and right-closed
...
Signed-off-by: Zhang Zhanpeng <zhangzhanpeng.zzp@alibaba-inc.com>
Signed-off-by: beorn7 <beorn@grafana.com>
Co-authored-by: beorn7 <beorn@grafana.com>
2024-06-20 22:05:40 +08:00
Charles Korn
aeec30f082
Convert `TestTimestampFunction_StepsMoreOftenThanSamples`
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-17 16:56:56 +10:00
Jeanette Tan
f028496133
Merge branch 'main' into nhcb
...
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2024-05-14 16:20:15 +08:00
Bryan Boreham
11b27d5d22
test: move test files into new promqltest package
...
So that promql package does not bring in test-only dependencies.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-08 13:42:55 +01:00