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

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

Issue 12499006: Telemetry on android: improves RawDisplayFrameRateMeasurement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 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: tools/telemetry/telemetry/core/chrome/android_platform_backend.py
diff --git a/tools/telemetry/telemetry/core/chrome/android_platform_backend.py b/tools/telemetry/telemetry/core/chrome/android_platform_backend.py
index 01e78b565103c94db07555e6da8df652813e0b02..e5d8036ba798b2da54a62ba89e1cc902b0bdf970 100644
--- a/tools/telemetry/telemetry/core/chrome/android_platform_backend.py
+++ b/tools/telemetry/telemetry/core/chrome/android_platform_backend.py
@@ -6,6 +6,7 @@ import logging
import os
import sys
+from telemetry.core.chrome import platform
from telemetry.core.chrome import platform_backend
# Get build/android scripts into our path.
@@ -31,22 +32,32 @@ class AndroidPlatformBackend(platform_backend.PlatformBackend):
self._perf_tests_setup = perf_tests_helper.PerfTestSetup(self._adb)
self._thermal_throttle = thermal_throttle.ThermalThrottle(self._adb)
self._no_performance_mode = no_performance_mode
+ self._raw_display_frame_rate_measurements = []
if self._no_performance_mode:
logging.warning('CPU governor will not be set!')
def IsRawDisplayFrameRateSupported(self):
return True
- def StartRawDisplayFrameRateMeasurement(self, trace_tag):
+ def StartRawDisplayFrameRateMeasurement(self):
assert not self._surface_stats_collector
self._surface_stats_collector = \
- surface_stats_collector.SurfaceStatsCollector(self._adb, trace_tag)
+ surface_stats_collector.SurfaceStatsCollector(self._adb, '')
+ self._surface_stats_collector.SuppressPrintingResults()
self._surface_stats_collector.__enter__()
def StopRawDisplayFrameRateMeasurement(self):
self._surface_stats_collector.__exit__()
+ for r in self._surface_stats_collector.GetResults():
+ self._raw_display_frame_rate_measurements.append(
+ platform.Platform.RawDisplayFrameRateMeasurement(
+ r.name, r.value, r.unit))
+
self._surface_stats_collector = None
+ def GetRawDisplayFrameRateMeasurements(self):
+ return self._raw_display_frame_rate_measurements
+
def SetFullPerformanceModeEnabled(self, enabled):
if self._no_performance_mode:
return
« no previous file with comments | « tools/perf/perf_tools/smoothness_benchmark.py ('k') | tools/telemetry/telemetry/core/chrome/cros_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698