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

Side by Side Diff: tools/perf/measurements/tab_switching.py

Issue 586503002: [Telemetry] Specify units for tab switching time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 """The tab switching measurement. 5 """The tab switching measurement.
6 6
7 This measurement opens pages in different tabs. After all the tabs have opened, 7 This measurement opens pages in different tabs. After all the tabs have opened,
8 it cycles through each tab in sequence, and records a histogram of the time 8 it cycles through each tab in sequence, and records a histogram of the time
9 between when a tab was first requested to be shown, and when it was painted. 9 between when a tab was first requested to be shown, and when it was painted.
10 Power usage is also measured. 10 Power usage is also measured.
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 util.WaitFor(_IsDone, 30) 89 util.WaitFor(_IsDone, 30)
90 prev_histogram = histogram_util.GetHistogram( 90 prev_histogram = histogram_util.GetHistogram(
91 histogram_type, histogram_name, tab) 91 histogram_type, histogram_name, tab)
92 92
93 last_histogram = histogram_util.GetHistogram( 93 last_histogram = histogram_util.GetHistogram(
94 histogram_type, histogram_name, tab) 94 histogram_type, histogram_name, tab)
95 diff_histogram = histogram_util.SubtractHistogram(last_histogram, 95 diff_histogram = histogram_util.SubtractHistogram(last_histogram,
96 first_histogram) 96 first_histogram)
97 97
98 results.AddSummaryValue( 98 results.AddSummaryValue(
99 histogram.HistogramValue(None, display_name, '', 99 histogram.HistogramValue(None, display_name, 'ms',
100 raw_value_json=diff_histogram, 100 raw_value_json=diff_histogram,
101 important=False)) 101 important=False))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698