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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend.py

Issue 675843004: Telemetry: Implement idle wakeups counting on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nit Created 6 years, 1 month 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: tools/telemetry/telemetry/core/platform/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend.py b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
index 27ebfc99b4cc15bb33c8aa7b8d3ae31d919a0841..a7b60e912cdd95f71f02bd89ddbf7cae44cdb365 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend.py
@@ -298,6 +298,9 @@ class AndroidPlatformBackend(
def CanMonitorPower(self):
return self._power_monitor.CanMonitorPower()
+ def CanMeasureIdleWakeUps(self):
+ return True
+
def StartMonitoringPower(self, browser):
self._power_monitor.StartMonitoringPower(browser)
@@ -478,6 +481,12 @@ class AndroidPlatformBackend(
"""
return '/data/data/%s/' % package
+ def _EnableTimerStatsCollection(self, enable):
+ """Writes to /proc/timer_stats to start/stop measuring process wakeups."""
+ parameter = 1 if enable else 0
+ cmd = 'echo %d > /proc/timer_stats' % parameter
+ self._device.RunShellCommand(cmd, as_root=True)
+
def SetDebugApp(self, package):
"""Set application to debugging.

Powered by Google App Engine
This is Rietveld 408576698