-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix distributing staged stats when not updated three times in a row
The stats were supposed to be distributed once they had changed, but in practice they were always distributed, as the packet count is absolute rather than relative. Nevertheless, if the packet count did not change distributing them would have no effect. The problem could appear in the (rare) case of the timestamps not being updated three times in a row, as the distribution algorithm failed if the final timestamp was the same as the initial timestamp (causing NaN to be set for the packets and packets lost). Due to all that now the staged stats are always distributed before being commited (which is still done when the stats stalled for two seconds), although the distribution exits early if the timestamps did not change. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
- Loading branch information
1 parent
37bd1a1
commit 8478201
Showing
2 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters