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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 [Bug]: Middleware Monitor "CPU Usage" is a "static value". #2978

Open
3 tasks done
nyufeng opened this issue Apr 23, 2024 · 2 comments 路 May be fixed by #2984
Open
3 tasks done

馃悰 [Bug]: Middleware Monitor "CPU Usage" is a "static value". #2978

nyufeng opened this issue Apr 23, 2024 · 2 comments 路 May be fixed by #2984

Comments

@nyufeng
Copy link

nyufeng commented Apr 23, 2024

Bug Description

When I use "Monitor", I found that the value of "CPU Usage" of the program does not change, but the CPU usage of the program has been changing dynamically by top or htop. The system "CPU" is also changing dynamically.
After reading the source code, I found that this value is the average value since the program started, and does not reflect the current load of the program in real time. I hope to improve it.

How to Reproduce

monitor.New()

Expected Behavior

Dynamically changing like top.

Fiber Version

v2.52.4

Code Snippet (optional)

No response

Checklist:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my problem prior to opening this one.
  • I understand that improperly formatted bug reports may be closed without explanation.
Copy link

welcome bot commented Apr 23, 2024

Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@nyufeng nyufeng changed the title 馃悰 [Bug]: Middleware Monitor "PID.CPU" is a "static value". 馃悰 [Bug]: Middleware Monitor "CPU Usage" is a "static value". Apr 23, 2024
@nyufeng nyufeng linked a pull request Apr 24, 2024 that will close this issue
9 tasks
@ReneWerner87 ReneWerner87 linked a pull request Apr 25, 2024 that will close this issue
9 tasks
@nyufeng
Copy link
Author

nyufeng commented May 7, 2024

If you're wondering the same thing, here's how to fix it
https://github.com/nyufeng/fiber-monitor

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

Successfully merging a pull request may close this issue.

2 participants