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

Side by Side Diff: build/util/lib/common/perf_tests_results_helper.py

Issue 24253006: Android / Telemetry: final cleanup on perf_tests_helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lint Created 7 years, 2 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 | Annotate | Revision Log
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 re 5 import re
6 import sys 6 import sys
7 7
8 import json 8 import json
9 import logging 9 import logging
10 import math 10 import math
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 '= ' if trace_name else '', 127 '= ' if trace_name else '',
128 value, 128 value,
129 units) 129 units)
130 else: 130 else:
131 assert perf_result_data_type.IsHistogram(result_type) 131 assert perf_result_data_type.IsHistogram(result_type)
132 assert isinstance(values, list) 132 assert isinstance(values, list)
133 # The histograms can only be printed individually, there's no computation 133 # The histograms can only be printed individually, there's no computation
134 # across different histograms. 134 # across different histograms.
135 assert len(values) == 1 135 assert len(values) == 1
136 value = values[0] 136 value = values[0]
137 output = '%s%s: %s= %s' % ( 137 output = '%s%s: %s= %s %s' % (
138 RESULT_TYPES[result_type], 138 RESULT_TYPES[result_type],
139 _EscapePerfResult(measurement), 139 _EscapePerfResult(measurement),
140 trace_name, 140 trace_name,
141 value) 141 value,
142 units)
142 avg, sd = GeomMeanAndStdDevFromHistogram(value) 143 avg, sd = GeomMeanAndStdDevFromHistogram(value)
143 144
144 if avg: 145 if avg:
145 output += '\nAvg %s: %f%s' % (measurement, avg, units) 146 output += '\nAvg %s: %f%s' % (measurement, avg, units)
146 if sd: 147 if sd:
147 output += '\nSd %s: %f%s' % (measurement, sd, units) 148 output += '\nSd %s: %f%s' % (measurement, sd, units)
148 if print_to_stdout: 149 if print_to_stdout:
149 print output 150 print output
150 sys.stdout.flush() 151 sys.stdout.flush()
151 return output 152 return output
OLDNEW
« no previous file with comments | « build/android/pylib/perf_tests_helper.py ('k') | tools/telemetry/telemetry/page/perf_tests_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698