mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 16:30:55 +01:00
app/vmselect/promql: reduce the diff for f148cffc8a
This is a follow-up for c826f06366
This commit is contained in:
parent
27c4c5a530
commit
8a83c59956
@ -572,22 +572,23 @@ func vmrangeBucketsToLE(tss []*timeseries) []*timeseries {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
xss = xssNew
|
xss = xssNew
|
||||||
if len(xss) > 0 {
|
if len(xss) == 0 {
|
||||||
for i := range xss[0].ts.Values {
|
continue
|
||||||
count := float64(0)
|
}
|
||||||
for _, xs := range xss {
|
for i := range xss[0].ts.Values {
|
||||||
ts := xs.ts
|
count := float64(0)
|
||||||
v := ts.Values[i]
|
|
||||||
if !math.IsNaN(v) && v > 0 {
|
|
||||||
count += v
|
|
||||||
}
|
|
||||||
ts.Values[i] = count
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for _, xs := range xss {
|
for _, xs := range xss {
|
||||||
rvs = append(rvs, xs.ts)
|
ts := xs.ts
|
||||||
|
v := ts.Values[i]
|
||||||
|
if !math.IsNaN(v) && v > 0 {
|
||||||
|
count += v
|
||||||
|
}
|
||||||
|
ts.Values[i] = count
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, xs := range xss {
|
||||||
|
rvs = append(rvs, xs.ts)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return rvs
|
return rvs
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user