Index: tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py |
diff --git a/tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py b/tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py |
index 7d708b0756bcf66895fb7be6b7d4c98e39fb684f..76558f498a38960b3a59a83328c06ee0bf0ec9ae 100644 |
--- a/tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py |
+++ b/tools/telemetry/telemetry/core/platform/power_monitor/android_dumpsys_power_monitor.py |
@@ -45,7 +45,8 @@ class DumpsysPowerMonitor(sysfs_power_monitor.SysfsPowerMonitor): |
result = self._platform.RunCommand('dumpsys batterystats -c %s' % package) |
assert result, 'Dumpsys produced no output' |
return super(DumpsysPowerMonitor, self).CombineResults( |
- cpu_stats, DumpsysPowerMonitor.ParseSamplingOutput(package, result)) |
+ cpu_stats, DumpsysPowerMonitor.ParseSamplingOutput(package, |
+ result.split('\n'))) |
@staticmethod |
def ParseSamplingOutput(package, dumpsys_output): |
@@ -103,8 +104,9 @@ class DumpsysPowerMonitor(sysfs_power_monitor.SysfsPowerMonitor): |
# Find the uid of for the given package. |
if not package in uid_entries: |
- logging.warning('Unable to parse dumpsys output. ' + |
- 'Please upgrade the OS version of the device.') |
+ logging.warning('Unable to parse dumpsys output. ' |
+ 'Please upgrade the OS version of the device.' |
+ 'package=%s, uid_entries=%s' % (package, uid_entries)) |
out_dict['energy_consumption_mwh'] = 0 |
return out_dict |
uid = uid_entries[package] |