mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-19 07:01:02 +01:00
5df50e5645
### Describe Your Changes
* check if `lastValue` was seen at least twice with different
timestamps. Otherwise, the difference between last timestamp and
previous timestamp could be `0` and will result into `NaN` calculation
* check if there items left in lastValue map after staleness cleanup.
Otherwise, `rate_avg` could have produce `NaN` result.
### Checklist
The following checks are **mandatory**:
- [x] My change adheres [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/contributing/).
---------
Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
avg.go | ||
count_samples.go | ||
count_series.go | ||
dedup_test.go | ||
dedup_timing_test.go | ||
dedup.go | ||
deduplicator_test.go | ||
deduplicator_timing_test.go | ||
deduplicator.go | ||
histogram_bucket.go | ||
last.go | ||
max.go | ||
min.go | ||
quantiles.go | ||
rate.go | ||
stddev.go | ||
stdvar.go | ||
streamaggr_test.go | ||
streamaggr_timing_test.go | ||
streamaggr.go | ||
sum_samples.go | ||
total.go | ||
unique_samples.go |