-
Notifications
You must be signed in to change notification settings - Fork 249
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
fix_: bandwidthCounter should be reset each time it is retrieved otherwise it behaves like an accumulator #5898
Conversation
…rwise it behaves like an accumulator
823db33
to
e3c5232
Compare
Jenkins Builds
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## develop #5898 +/- ##
==========================================
Coverage ? 46.05%
==========================================
Files ? 888
Lines ? 157382
Branches ? 0
==========================================
Hits ? 72488
Misses ? 76569
Partials ? 8325
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
one minor comment
go telemetry.PushProtocolStats(w.bandwidthCounter.GetBandwidthByProtocol()) | ||
case <-ticker.C: | ||
bandwidthPerProtocol := w.bandwidthCounter.GetBandwidthByProtocol() | ||
w.bandwidthCounter.Reset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this mean if we want to use GetBandwidthByPeer
or some other metric which uses same underlying counter, it will not work right..we will have to get all the metrics in same place and reset the counter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly yes, it is not possible to have multiple bandwidth counters
While adding prometheus bandwidth metrics to go-waku, @AlbertoSoutullo noticed that go-waku service nodes metric value was incorrect.
This PR includes the fix that was applied to the go-waku service node