Fix time based average stats (#442)

* keep track of current stats and zero them after updating averages

* Try tests

* typo

* remove commented test stuff

* Avoid dividing by zero

* Fix test

* refactor, get rid of iterator. do it manually

* trigger build

* Fix
This commit is contained in:
Zain Kabani
2023-05-18 00:38:10 -04:00
committed by GitHub
parent 0898461c01
commit 7f57a89d75
4 changed files with 149 additions and 114 deletions

View File

@@ -113,6 +113,7 @@ impl Collector {
for stats in server_stats.values() {
if !stats.check_address_stat_average_is_updated_status() {
stats.address_stats().update_averages();
stats.address_stats().reset_current_counts();
stats.set_address_stat_average_is_updated_status(true);
}
}