-
Notifications
You must be signed in to change notification settings - Fork 21.4k
p2p/discover: add traffic metrics #27008
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
Conversation
|
|
||
| func newMeteredConn(conn UDPConn) UDPConn { | ||
| // Short circuit if metrics are disabled | ||
| if !metrics.Enabled { |
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.
I am not fully sure that we should use metrics.Enabled or metrics.EnabledExpensive.
The former one will be enabled once the metric system is turned on. The latter one is more for debug purpose which might impact runtime performance.
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.
It's OK to use metrics.Enabled for discovery. The packet rate is not so high.
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
This reverts commit 11fafa4.
This reverts commit 11fafa4.
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
Co-authored-by: Exca-DK <[email protected]> Co-authored-by: rjl493456442 <[email protected]>
This PR adds similar to p2p/metrics metered connection for discovery module. The aim is to have more detailed information about network usage which currently isn't tracked for discV4 and discV5.