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

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

Closed
3 tasks done
nyufeng opened this issue Apr 23, 2024 · 3 comments · Fixed by #2984
Closed
3 tasks done

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

nyufeng opened this issue Apr 23, 2024 · 3 comments · 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
@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

@gaby
Copy link
Member

gaby commented Jun 29, 2024

@nyufeng Your fixes will be released in the next v2 release.

Fixed via #2984

@gaby gaby closed this as completed Jun 29, 2024
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.

3 participants