| OLD | NEW |
| 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 Loading... |
| 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)) |
| OLD | NEW |