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

Side by Side Diff: tools/perf/measurements/session_restore.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: Move GetEncryptionPassword so that it gets compiled on iOS. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « tools/perf/measurements/page_cycler_unittest.py ('k') | tools/perf/measurements/startup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import collections 5 import collections
6 6
7 from measurements import startup 7 from measurements import startup
8 from metrics import cpu 8 from metrics import cpu
9 from metrics import startup_metric 9 from metrics import startup_metric
10 from telemetry.core import util 10 from telemetry.core import util
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 if len(wpr_archive_names_to_page_urls.keys()) > 1: 63 if len(wpr_archive_names_to_page_urls.keys()) > 1:
64 raise Exception("Invalid pageset: more than 1 WPR archive found.: " + 64 raise Exception("Invalid pageset: more than 1 WPR archive found.: " +
65 repr(wpr_archive_names_to_page_urls)) 65 repr(wpr_archive_names_to_page_urls))
66 66
67 def DidStartBrowser(self, browser): 67 def DidStartBrowser(self, browser):
68 self._cpu_metric = cpu.CpuMetric(browser) 68 self._cpu_metric = cpu.CpuMetric(browser)
69 self._cpu_metric.Start(None, None) 69 self._cpu_metric.Start(None, None)
70 70
71 def ValidateAndMeasurePage(self, page, tab, results): 71 def ValidateAndMeasurePage(self, page, tab, results):
72 tab.WaitForDocumentReadyStateToBeComplete() 72 tab.WaitForDocumentReadyStateToBeComplete()
73 super(SessionRestore, self).ValidateAndMeasurePage(page, tab, results)
73 74
74 # Record CPU usage from browser start to when the foreground page is loaded. 75 # Record CPU usage from browser start to when the foreground page is loaded.
75 self._cpu_metric.Stop(None, None) 76 self._cpu_metric.Stop(None, None)
76 self._cpu_metric.AddResults(tab, results, 'cpu_utilization') 77 self._cpu_metric.AddResults(tab, results, 'cpu_utilization')
77 78
78 startup_metric.StartupMetric().AddResults(tab, results)
79
80 # TODO(jeremy): Measure time to load - first, last and frontmost tab here. 79 # TODO(jeremy): Measure time to load - first, last and frontmost tab here.
OLDNEW
« no previous file with comments | « tools/perf/measurements/page_cycler_unittest.py ('k') | tools/perf/measurements/startup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698