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

Side by Side Diff: tools/perf/metrics/startup_metric.py

Issue 1029263003: [telemetry] Sort imports in Telemetry and its dependents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure we're up to date. Created 5 years, 9 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/metrics/speedindex_unittest.py ('k') | tools/perf/metrics/system_memory.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 import collections 4 import collections
5 import json 5 import json
6 import logging 6 import logging
7 7
8 from metrics import Metric
9
10 from telemetry.core import exceptions 8 from telemetry.core import exceptions
11 from telemetry.value import histogram_util 9 from telemetry.value import histogram_util
12 from telemetry.value import scalar 10 from telemetry.value import scalar
13 11
12 from metrics import Metric
13
14 14
15 class StartupMetric(Metric): 15 class StartupMetric(Metric):
16 "A metric for browser startup time." 16 "A metric for browser startup time."
17 17
18 HISTOGRAMS_TO_RECORD = { 18 HISTOGRAMS_TO_RECORD = {
19 'messageloop_start_time' : 19 'messageloop_start_time' :
20 'Startup.BrowserMessageLoopStartTimeFromMainEntry', 20 'Startup.BrowserMessageLoopStartTimeFromMainEntry',
21 'window_display_time' : 'Startup.BrowserWindowDisplay', 21 'window_display_time' : 'Startup.BrowserWindowDisplay',
22 'open_tabs_time' : 'Startup.BrowserOpenTabs'} 22 'open_tabs_time' : 'Startup.BrowserOpenTabs'}
23 23
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 results.AddValue(scalar.ScalarValue( 118 results.AddValue(scalar.ScalarValue(
119 results.current_page, display_name, 'ms', measured_time)) 119 results.current_page, display_name, 'ms', measured_time))
120 120
121 # Get tab load times. 121 # Get tab load times.
122 browser_main_entry_time_ms = self._GetBrowserMainEntryTime(tab) 122 browser_main_entry_time_ms = self._GetBrowserMainEntryTime(tab)
123 if (browser_main_entry_time_ms is None): 123 if (browser_main_entry_time_ms is None):
124 print "Outdated Chrome version, browser main entry time not supported." 124 print "Outdated Chrome version, browser main entry time not supported."
125 return 125 return
126 self._RecordTabLoadTimes(tab, browser_main_entry_time_ms, results) 126 self._RecordTabLoadTimes(tab, browser_main_entry_time_ms, results)
OLDNEW
« no previous file with comments | « tools/perf/metrics/speedindex_unittest.py ('k') | tools/perf/metrics/system_memory.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698