fixed bug in performance boost logic. (#131)

Now boosts when max core usage is above 75% rather than max core usage
close to 75%
This commit is contained in:
dfuehrer 2020-11-28 09:34:31 -07:00 committed by GitHub
parent 3e712b8d5d
commit d0aeb8c2a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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()