mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-05 22:32:20 +01:00
app/vmselect/promql: fix outilersk
calculations
This commit is contained in:
parent
5e4d08ac22
commit
37068064dd
@ -648,6 +648,9 @@ func aggrFuncOutliersK(afa *aggrFuncArg) ([]*timeseries, error) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Return only up to k time series with the highest variation.
|
// Return only up to k time series with the highest variation.
|
||||||
|
for i := range variations {
|
||||||
|
tss[i] = variations[i].ts
|
||||||
|
}
|
||||||
for i, k := range ks {
|
for i, k := range ks {
|
||||||
fillNaNsAtIdx(i, k, tss)
|
fillNaNsAtIdx(i, k, tss)
|
||||||
}
|
}
|
||||||
|
@ -4221,7 +4221,7 @@ func TestExecSuccess(t *testing.T) {
|
|||||||
t.Run(`outliersk(1)`, func(t *testing.T) {
|
t.Run(`outliersk(1)`, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
q := `outliersk(1, (
|
q := `outliersk(1, (
|
||||||
label_set(1300, "foo", "bar"),
|
label_set(2000, "foo", "bar"),
|
||||||
label_set(time(), "baz", "sss"),
|
label_set(time(), "baz", "sss"),
|
||||||
))`
|
))`
|
||||||
r := netstorage.Result{
|
r := netstorage.Result{
|
||||||
|
Loading…
Reference in New Issue
Block a user