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

Unified Diff: build/android/pylib/thermal_throttle.py

Issue 18764005: [Telemetry] Cut down on the amount of log spam on the android perf bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Also avoid pulling the omap_temp_file Created 7 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
« no previous file with comments | « build/android/pylib/surface_stats_collector.py ('k') | tools/telemetry/telemetry/page/page_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/thermal_throttle.py
diff --git a/build/android/pylib/thermal_throttle.py b/build/android/pylib/thermal_throttle.py
index ebd61d6f5e5d728e683dfd25b1f8dcaa72f3abc1..4028f0723f351cc07874c6ffa748b2bf26405c11 100644
--- a/build/android/pylib/thermal_throttle.py
+++ b/build/android/pylib/thermal_throttle.py
@@ -51,20 +51,22 @@ class ThermalThrottle(object):
logging.info(u' Device %s Thermally Thottled at %3.1f%sC',
serial_number, temp, degree_symbol)
- # Print temperature of CPU SoC.
- omap_temp_file = '/sys/devices/platform/omap/omap_temp_sensor.0/temperature'
- if self._adb.FileExistsOnDevice(omap_temp_file):
- tempdata = self._adb.GetFileContents(omap_temp_file)
- temp = float(tempdata[0]) / 1000.0
- logging.info(u'Current OMAP Temperature of %s = %3.1f%sC',
- serial_number, temp, degree_symbol)
+ if logging.getLogger().isEnabledFor(logging.DEBUG):
+ # Print temperature of CPU SoC.
+ omap_temp_file = ('/sys/devices/platform/omap/omap_temp_sensor.0/'
+ 'temperature')
+ if self._adb.FileExistsOnDevice(omap_temp_file):
+ tempdata = self._adb.GetFileContents(omap_temp_file)
+ temp = float(tempdata[0]) / 1000.0
+ logging.debug(u'Current OMAP Temperature of %s = %3.1f%sC',
+ serial_number, temp, degree_symbol)
- # Print temperature of battery, to give a system temperature
- dumpsys_log = self._adb.RunShellCommand('dumpsys battery')
- for line in dumpsys_log:
- if 'temperature' in line:
- btemp = float([s for s in line.split() if s.isdigit()][0]) / 10.0
- logging.info(u'Current battery temperature of %s = %3.1f%sC',
- serial_number, btemp, degree_symbol)
+ # Print temperature of battery, to give a system temperature
+ dumpsys_log = self._adb.RunShellCommand('dumpsys battery')
+ for line in dumpsys_log:
+ if 'temperature' in line:
+ btemp = float([s for s in line.split() if s.isdigit()][0]) / 10.0
+ logging.debug(u'Current battery temperature of %s = %3.1f%sC',
+ serial_number, btemp, degree_symbol)
return has_been_throttled
« no previous file with comments | « build/android/pylib/surface_stats_collector.py ('k') | tools/telemetry/telemetry/page/page_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698