Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkBandwidth deltas and rates are not calculated correctly? #49

Closed
320x200 opened this issue Jan 4, 2019 · 4 comments
Closed

NetworkBandwidth deltas and rates are not calculated correctly? #49

320x200 opened this issue Jan 4, 2019 · 4 comments
Assignees
Labels
Milestone

Comments

@320x200
Copy link

320x200 commented Jan 4, 2019

Hi,

According to the manual:

[The] average [bandwidth] is based on the global checking interval specified in the configuration file via the interval option.

However, self._previous_values and self._previous_time are never updated. Their values are the ones at time of the start of autosuspend. As a result the average is not so much based on the global checking interval, but more that the average is based on total traffic since the start of the software and this average is updated at each interval.

Could it be possible to have these previous values updated at each interval so that we can get the average within the specified interval? Otherwise it makes this feature a bit difficult to use, unless I am overlooking something of course!

Thanks!

@languitar
Copy link
Owner

Oops, yes, that should actually be what the check is all about. Seems I missed that issue.

@languitar languitar added the bug label Jan 5, 2019
@languitar languitar self-assigned this Jan 5, 2019
@320x200
Copy link
Author

320x200 commented Jan 6, 2019

Ah, glad that I did not misunderstood the feature! I can try to submit a fix, how/where would you store the previous values and previous time info?

languitar added a commit that referenced this issue Jan 11, 2019
Ensure that each iteration of NetworkBandwidth really uses the state
from the previous iteration for comparison.

fixes #49
languitar added a commit that referenced this issue Jan 11, 2019
Ensure that each iteration of NetworkBandwidth really uses the state
from the previous iteration for comparison.

fixes #49
languitar added a commit that referenced this issue Jan 11, 2019
Ensure that each iteration of NetworkBandwidth really uses the state
from the previous iteration for comparison.

fixes #49

(cherry picked from commit 79c20da)
@languitar
Copy link
Owner

Sorry for the delay. The issue is fixed and release as v2.0.3. Packaging for Archlinux and Debian is on its way.

@320x200
Copy link
Author

320x200 commented Jan 12, 2019

Thanks for the quick fix, works like a charm!

@languitar languitar added this to the 2.0.3 milestone Jan 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants