Fix CPU load calculation for multi-core systems

- Use percpu=False to get average across all CPUs
- Prevents false warnings when single thread is at 100%
- Correctly reports 8.3% load instead of 100% on 12-core system
parent e7a0c182
......@@ -3225,8 +3225,8 @@ class TimingTracker:
load_factor = 1.0
try:
# CPU load
cpu_percent = psutil.cpu_percent(interval=0.5)
# CPU load - get average across all CPUs (not per-CPU)
cpu_percent = psutil.cpu_percent(interval=0.5, percpu=False)
if cpu_percent > 80:
load_factor += 0.5 # 50% slower if CPU is heavily loaded
elif cpu_percent > 50:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment