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

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: Respond to offline comments from tonyg. 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..3f7c87c4131c35527ea53392ed90d688b0c99957 100644
--- a/tools/perf/measurements/tab_switching.py
+++ b/tools/perf/measurements/tab_switching.py
@@ -12,6 +12,7 @@ Power usage is also measured.
import time
+from metrics import keychain_metric
from metrics import power
from telemetry.core import util
from telemetry.page import page_test
@@ -31,6 +32,9 @@ class TabSwitching(page_test.PageTest):
self._power_metric = None
def CustomizeBrowserOptions(self, options):
+ if keychain_metric.KeychainMetric.ShouldCollectKeychainMetrics():
+ keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
+
options.AppendExtraBrowserArgs([
'--enable-stats-collection-bindings'
])
@@ -99,3 +103,6 @@ class TabSwitching(page_test.PageTest):
histogram.HistogramValue(None, display_name, 'ms',
raw_value_json=diff_histogram,
important=False))
+
+ if keychain_metric.KeychainMetric.ShouldCollectKeychainMetrics():
+ keychain_metric.KeychainMetric().AddResults(tab, results)

Powered by Google App Engine
This is Rietveld 408576698