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

Unified Diff: tools/perf/perf_tools/smoothness_benchmark.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/perf/perf_tools/smoothness_benchmark.py
diff --git a/tools/perf/perf_tools/smoothness_benchmark.py b/tools/perf/perf_tools/smoothness_benchmark.py
index 190061519ffa1f6b2ff79e5800878a49e4b7ded2..1d469f3ad731270ba87c1a6455c440b3caf4b496 100644
--- a/tools/perf/perf_tools/smoothness_benchmark.py
+++ b/tools/perf/perf_tools/smoothness_benchmark.py
@@ -164,6 +164,8 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark):
return hasattr(page, 'smoothness')
def WillRunAction(self, page, tab, action):
+ if tab.browser.platform.IsRawDisplayFrameRateSupported():
+ tab.browser.platform.StartRawDisplayFrameRateMeasurement()
self._measurement = smoothness_measurement.SmoothnessMeasurement(tab)
if action.CanBeBound():
self._measurement.BindToAction(action)
@@ -171,6 +173,8 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark):
self._measurement.Start()
def DidRunAction(self, page, tab, action):
+ if tab.browser.platform.IsRawDisplayFrameRateSupported():
+ tab.browser.platform.StopRawDisplayFrameRateMeasurement()
if not action.CanBeBound():
self._measurement.Stop()
@@ -200,3 +204,7 @@ class SmoothnessBenchmark(page_benchmark.PageBenchmark):
if self.options.report_all_results:
for k, v in rendering_stats_deltas.iteritems():
results.Add(k, '', v)
+
+ if tab.browser.platform.IsRawDisplayFrameRateSupported():
+ for r in tab.browser.platform.GetRawDisplayFrameRateMeasurements():
+ results.Add(r.name, r.unit, r.value)
« no previous file with comments | « build/android/pylib/surface_stats_collector.py ('k') | tools/telemetry/telemetry/core/chrome/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698