Skip to content

Commit

Permalink
fixed bug in performance boost logic. (#131)
Browse files Browse the repository at this point in the history
Now boosts when max core usage is above 75% rather than max core usage
close to 75%
  • Loading branch information
dfuehrer authored Nov 28, 2020
1 parent 3e712b8 commit d0aeb8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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()
Expand Down

0 comments on commit d0aeb8c

Please sign in to comment.