mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: skip infinite values when calculating smooth_exponential
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/757
This commit is contained in:
parent
8a8b5a73d3
commit
204ec415b4
1 changed files with 7 additions and 1 deletions
|
@ -1030,6 +1030,12 @@ func transformSmoothExponential(tfa *transformFuncArg) ([]*timeseries, error) {
|
|||
rvs := args[0]
|
||||
for _, ts := range rvs {
|
||||
values := skipLeadingNaNs(ts.Values)
|
||||
for i, v := range values {
|
||||
if !math.IsInf(v, 0) {
|
||||
values = values[i:]
|
||||
break
|
||||
}
|
||||
}
|
||||
if len(values) == 0 {
|
||||
continue
|
||||
}
|
||||
|
@ -1037,7 +1043,7 @@ func transformSmoothExponential(tfa *transformFuncArg) ([]*timeseries, error) {
|
|||
values = values[1:]
|
||||
sfsX := sfs[len(ts.Values)-len(values):]
|
||||
for i, v := range values {
|
||||
if math.IsNaN(v) {
|
||||
if math.IsNaN(v) || math.IsInf(v, 0) {
|
||||
continue
|
||||
}
|
||||
sf := sfsX[i]
|
||||
|
|
Loading…
Reference in a new issue