mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 00:13:30 +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.
|
||||
for i := range variations {
|
||||
tss[i] = variations[i].ts
|
||||
}
|
||||
for i, k := range ks {
|
||||
fillNaNsAtIdx(i, k, tss)
|
||||
}
|
||||
|
@ -4221,7 +4221,7 @@ func TestExecSuccess(t *testing.T) {
|
||||
t.Run(`outliersk(1)`, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
q := `outliersk(1, (
|
||||
label_set(1300, "foo", "bar"),
|
||||
label_set(2000, "foo", "bar"),
|
||||
label_set(time(), "baz", "sss"),
|
||||
))`
|
||||
r := netstorage.Result{
|
||||
|
Loading…
Reference in New Issue
Block a user