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

Unified Diff: tools/perf/measurements/tab_switching.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/tab_switching.py
diff --git a/tools/perf/measurements/tab_switching.py b/tools/perf/measurements/tab_switching.py
index 41290dc07de244e293b794f3c951467bfae2d0d0..23ef78df21b3839a3fa7a1b5de88de2c0fa5f0b8 100644
--- a/tools/perf/measurements/tab_switching.py
+++ b/tools/perf/measurements/tab_switching.py
@@ -12,15 +12,15 @@ Power usage is also measured.
import time
+from measurements import PageTestMeasurement
from metrics import power
from telemetry.core import util
-from telemetry.page import page_test
from telemetry.value import histogram
from telemetry.value import histogram_util
# TODO: Revisit this test once multitab support is finalized.
-class TabSwitching(page_test.PageTest):
+class TabSwitching(PageTestMeasurement):
# Amount of time to measure, in seconds.
SAMPLE_TIME = 30
@@ -31,6 +31,7 @@ class TabSwitching(page_test.PageTest):
self._power_metric = None
def CustomizeBrowserOptions(self, options):
+ super(TabSwitching, self).CustomizeBrowserOptions(options)
options.AppendExtraBrowserArgs([
'--enable-stats-collection-bindings'
])
@@ -99,3 +100,5 @@ class TabSwitching(page_test.PageTest):
histogram.HistogramValue(None, display_name, 'ms',
raw_value_json=diff_histogram,
important=False))
+
+ super(TabSwitching, self).ValidateAndMeasurePage(page, tab, results)

Powered by Google App Engine
This is Rietveld 408576698