mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect: always return zero for stddev
func if there is only one value (#1659)
The fix will always return zero if received set of items consists of one element only, which also means no deviation. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
72468c9d75
commit
f46f847531
1 changed files with 1 additions and 1 deletions
|
@ -1373,7 +1373,7 @@ func rollupStdvar(rfa *rollupFuncArg) float64 {
|
|||
}
|
||||
if len(values) == 1 {
|
||||
// Fast path.
|
||||
return values[0]
|
||||
return 0
|
||||
}
|
||||
var avg float64
|
||||
var count float64
|
||||
|
|
Loading…
Reference in a new issue