From d0aeb8c2a2efc692e07fee098b9f8757b452591e Mon Sep 17 00:00:00 2001 From: dfuehrer <32801037+dfuehrer@users.noreply.github.com> Date: Sat, 28 Nov 2020 09:34:31 -0700 Subject: [PATCH] fixed bug in performance boost logic. (#131) Now boosts when max core usage is above 75% rather than max core usage close to 75% --- source/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core.py b/source/core.py index 329ccaa0..5c37fdc7 100644 --- a/source/core.py +++ b/source/core.py @@ -372,7 +372,7 @@ def set_performance(): # cpu usage/system load display_load() - if psutil.cpu_percent(percpu=False, interval=0.01) >= 20.0 or isclose(max(psutil.cpu_percent(percpu=True, interval=0.01)), 75): + if psutil.cpu_percent(percpu=False, interval=0.01) >= 20.0 or max(psutil.cpu_percent(percpu=True, interval=0.01)) >= 75: print("High CPU load, setting turbo boost: on") turbo(True) elif load1m >= performance_load_threshold: @@ -391,7 +391,7 @@ def mon_performance(): # cpu usage/system load display_load() - if psutil.cpu_percent(percpu=False, interval=0.01) >= 20.0 or isclose(max(psutil.cpu_percent(percpu=True, interval=0.01)), 75): + if psutil.cpu_percent(percpu=False, interval=0.01) >= 20.0 or max(psutil.cpu_percent(percpu=True, interval=0.01)) >= 75: print("High CPU load, suggesting to set turbo boost: on") get_turbo() footer()