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

Unified Diff: tools/perf/benchmarks/media.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/benchmarks/media.py
diff --git a/tools/perf/benchmarks/media.py b/tools/perf/benchmarks/media.py
index 820fa374d75b903c481eccdddd2071a02df1874f..961eeafc73c70a82ad817b6e2774ee6b48e35bd5 100644
--- a/tools/perf/benchmarks/media.py
+++ b/tools/perf/benchmarks/media.py
@@ -2,15 +2,16 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from measurements import media
import page_sets
+
+from measurements import media
+from measurements import PageTestMeasurement
from telemetry import benchmark
-from telemetry.page import page_test
from telemetry.value import list_of_scalar_values
from telemetry.value import scalar
-class _MSEMeasurement(page_test.PageTest):
+class _MSEMeasurement(PageTestMeasurement):
def ValidateAndMeasurePage(self, page, tab, results):
media_metric = tab.EvaluateJavaScript('window.__testMetrics')
trace = media_metric['id'] if 'id' in media_metric else None
@@ -27,6 +28,7 @@ class _MSEMeasurement(page_test.PageTest):
results.AddValue(scalar.ScalarValue(
results.current_page, trace_name, units='ms',
value=float(metrics[m]), important=True))
+ super(_MSEMeasurement, self).ValidateAndMeasurePage(page, tab, results)
@benchmark.Disabled('android')

Powered by Google App Engine
This is Rietveld 408576698