Files
xingrin/backend
yyhuni c660447eca Fix CPU usage calculation to use delta sampling instead of cumulative values
- Replace single-sample CPU calculation with two-sample delta method
- Add 0.5 second sleep between CPU stat samples to calculate actual usage
- Parse all 7 CPU time fields (user, nice, sys, idle, iowait, irq, softirq) from /proc/stat
- Calculate CPU percentage as (1 - idle_diff/total_diff) * 100
- Add zero division protection when total_diff is 0
- Fix incorrect CPU usage reporting caused by using cumulative stat values
2025-12-12 20:19:51 +08:00
..
2025-12-12 18:04:57 +08:00
2025-12-12 18:04:57 +08:00
2025-12-12 18:04:57 +08:00
2025-12-12 18:04:57 +08:00
2025-12-12 18:04:57 +08:00
2025-12-12 18:04:57 +08:00