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/telemetry/telemetry/value/summary.py

Issue 445793004: Fix import order with isort tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 from collections import defaultdict 5 from collections import defaultdict
6 6
7 from telemetry.value import failure 7 from telemetry.value import failure
8 from telemetry.value import merge_values 8 from telemetry.value import merge_values
9 from telemetry.value import skip 9 from telemetry.value import skip
10 10
11
11 class Summary(object): 12 class Summary(object):
12 """Computes summary values from the per-page-run values produced by a test. 13 """Computes summary values from the per-page-run values produced by a test.
13 14
14 Some telemetry benchmark repeat a number of times in order to get a reliable 15 Some telemetry benchmark repeat a number of times in order to get a reliable
15 measurement. The test does not have to handle merging of these runs: 16 measurement. The test does not have to handle merging of these runs:
16 summarizer does it for you. 17 summarizer does it for you.
17 18
18 For instance, if two pages run, 3 and 1 time respectively: 19 For instance, if two pages run, 3 and 1 time respectively:
19 ScalarValue(page1, 'foo', units='ms', 1) 20 ScalarValue(page1, 'foo', units='ms', 1)
20 ScalarValue(page1, 'foo', units='ms', 1) 21 ScalarValue(page1, 'foo', units='ms', 1)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 should_print = True 152 should_print = True
152 else: 153 else:
153 should_print = False 154 should_print = False
154 155
155 if not should_print: 156 if not should_print:
156 return 157 return
157 158
158 # Actually save the result. 159 # Actually save the result.
159 self._computed_per_page_values.append(value) 160 self._computed_per_page_values.append(value)
160 self._interleaved_computed_per_page_values_and_summaries.append(value) 161 self._interleaved_computed_per_page_values_and_summaries.append(value)
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/value/string_unittest.py ('k') | tools/telemetry/telemetry/value/value_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698