Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3335)

Unified Diff: appengine/swarming/swarming_bot/api/os_utilities.py

Issue 2987023002: swarming: report CPU temperature on OSX as state. (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/swarming_bot/api/os_utilities.py
diff --git a/appengine/swarming/swarming_bot/api/os_utilities.py b/appengine/swarming/swarming_bot/api/os_utilities.py
index 525451fabdd2ddeafc204eb2d7f42c026284846f..c8c0409d024e47af832b6086702d5af2928e6297 100644
--- a/appengine/swarming/swarming_bot/api/os_utilities.py
+++ b/appengine/swarming/swarming_bot/api/os_utilities.py
@@ -1029,6 +1029,9 @@ def get_state():
state[u'integrity'] = [integrity]
if sys.platform == 'darwin':
state[u'xcode'] = platforms.osx.get_xcode_state()
+ temp = platforms.osx.get_cpu_temperature()
+ if temp is not None:
+ state[u'temp'] = temp
Vadim Sh. 2017/07/28 18:15:56 on linux this is a dict. Is there a way to make t
M-A Ruel 2017/07/28 20:41:57 Generalized.
if sys.platform == 'linux2':
temp = platforms.linux.get_temperatures()
if temp:

Powered by Google App Engine
This is Rietveld 408576698