π [Bug]: Middleware Monitor "CPU Usage" is a "static value".
nyufeng opened this issue Β· comments
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.
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
If you're wondering the same thing, here's how to fix it
https://github.com/nyufeng/fiber-monitor