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

Unified Diff: tools/perf/measurements/smoothness.py

Issue 714273004: mac: Expose keychain access frequency to Telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mock_keychain_sleep
Patch Set: Add a common subclass to measurements. 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/perf/measurements/smoothness.py
diff --git a/tools/perf/measurements/smoothness.py b/tools/perf/measurements/smoothness.py
index 406b32120225dcd85d39e55ff6d6e3778fbae755..db3eaf34995bee459f008f246f417dffd8fdd012 100644
--- a/tools/perf/measurements/smoothness.py
+++ b/tools/perf/measurements/smoothness.py
@@ -2,24 +2,27 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from metrics import power
+from measurements import PageTestMeasurement
from measurements import smoothness_controller
-from telemetry.page import page_test
-
+from metrics import power
-class Smoothness(page_test.PageTest):
+class Smoothness(PageTestMeasurement):
def __init__(self):
super(Smoothness, self).__init__('RunSmoothness')
self._power_metric = None
self._smoothness_controller = None
@classmethod
- def CustomizeBrowserOptions(cls, options):
+ def CustomizeBrowserOptionsClass(cls, options):
options.AppendExtraBrowserArgs('--enable-gpu-benchmarking')
options.AppendExtraBrowserArgs('--touch-events=enabled')
options.AppendExtraBrowserArgs('--running-performance-benchmark')
power.PowerMetric.CustomizeBrowserOptions(options)
+ def CustomizeBrowserOptions(self, options):
+ super(Smoothness, self).CustomizeBrowserOptions(options)
+ Smoothness.CustomizeBrowserOptionsClass(options)
+
def WillStartBrowser(self, platform):
self._power_metric = power.PowerMetric(platform)
@@ -36,6 +39,7 @@ class Smoothness(page_test.PageTest):
self._smoothness_controller.Stop(tab)
def ValidateAndMeasurePage(self, page, tab, results):
+ super(Smoothness, self).ValidateAndMeasurePage(page, tab, results)
self._power_metric.AddResults(tab, results)
self._smoothness_controller.AddResults(tab, results)

Powered by Google App Engine
This is Rietveld 408576698