Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CPU Frequency Graph by using GHz for the upper threshold instead of Hz #199

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions s_tui/sources/freq_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self):
Source.__init__(self)

self.name = 'Frequency'
self.measurement_unit = 'MHz'
self.measurement_unit = 'GHz'
self.pallet = ('freq light', 'freq dark',
'freq light smooth', 'freq dark smooth')

Expand Down Expand Up @@ -68,5 +68,6 @@ def get_maximum(self):
return self.max_freq

def get_top(self):
# Divide top frequency by 1000, as psutil only returns ghz instead of mhz (as of psutil v5.9.1)
logging.debug("Returning top %s", self.top_freq)
return self.top_freq
return self.top_freq / 1000