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

net.IOCounters optimise #1751

Open
Nyx2022 opened this issue Nov 27, 2024 · 0 comments
Open

net.IOCounters optimise #1751

Nyx2022 opened this issue Nov 27, 2024 · 0 comments

Comments

@Nyx2022
Copy link

Nyx2022 commented Nov 27, 2024

Is your feature request related to a problem? Please describe.
i'm using net.IOCounters to calc upstream and downstream speed, so i will call net.IOCounters every second,but when i use pprof to watch the performance , i found net.IOCounters will cost a 22% memory ,the flame is like

image

Describe the solution you'd like
i wish you can optimise the func to use sync.pool or other techs to reduce memery cost

Describe alternatives you've considered
use sync.pool or other techs

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant