Charles Korn
fd6bdf5230
Fix issue where summation of +/- infinity returns NaN instead of infinity
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-28 11:26:54 +10:00
Bryan Boreham
b6aba4ff14
Merge pull request #14074 from bboreham/kahan-sum-sum
...
[ENHANCEMENT] PromQL: use Kahan summation for sum()
2024-06-24 11:13:26 +01:00
Charles Korn
aeec30f082
Convert TestTimestampFunction_StepsMoreOftenThanSamples
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-17 16:56:56 +10:00
Charles Korn
987fa5c6a2
Convert range query test cases to test scripting language
...
Signed-off-by: Charles Korn <charles.korn@grafana.com>
2024-06-17 16:43:01 +10:00
beorn7
c7fdfe8004
promql: Add tests for histogram counter reset only in bucket
...
This also exercises the "fast path" (only decoding count and sum),
i.e. where the counter reset isn't visible at all in the decoded data.
Signed-off-by: beorn7 <beorn@grafana.com>
2024-06-06 17:47:38 +02:00
Neeraj Gartia
661856cb65
removes the added tests from engine_test.go
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-05-13 22:58:25 +05:30
Neeraj Gartia
6119124d0e
some nits
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-05-13 22:55:38 +05:30
Neeraj Gartia
adf5a36c1e
adds test for sum, count, stddev, stdvar, quantile and fraction func to promql testing framework
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-05-13 22:55:38 +05:30
Neeraj Gartia
8b838a05d9
adds test for native histogram rate func in promql testing framework
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-05-13 22:55:38 +05:30
Neeraj Gartia
548bd9d6fb
adds TestNativeHistogramRate func to promql test framework
...
Signed-off-by: Neeraj Gartia <neerajgartia211002@gmail.com>
2024-05-13 22:55:38 +05:30
Bryan Boreham
ea82b49c33
[ENHANCEMENT] PromQL: use Kahan summation for sum()
...
This can give a more precise result, by keeping a separate running
compensation value to accumulate small errors.
See https://en.wikipedia.org/wiki/Kahan_summation_algorithm
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2024-05-09 14:29:38 +01: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