movingAverageSpeed: comment for ewma.Value()
Vladimir Bauer
2 years ago
| 83 | 83 |
|
| 84 | 84 |
func (d *movingAverageSpeed) Decor(s Statistics) (string, int) {
|
| 85 | 85 |
var str string
|
|
86 |
// ewma implementation may return 0 before accumulating certain number of samples
|
| 86 | 87 |
if v := d.average.Value(); v != 0 {
|
| 87 | 88 |
str = d.producer(float64(1e9) / v)
|
| 88 | 89 |
} else {
|