mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01: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
dd536b475c
commit
de810031bf
@ -1373,7 +1373,7 @@ func rollupStdvar(rfa *rollupFuncArg) float64 {
|
|||||||
}
|
}
|
||||||
if len(values) == 1 {
|
if len(values) == 1 {
|
||||||
// Fast path.
|
// Fast path.
|
||||||
return values[0]
|
return 0
|
||||||
}
|
}
|
||||||
var avg float64
|
var avg float64
|
||||||
var count float64
|
var count float64
|
||||||
|
Loading…
Reference in New Issue
Block a user