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

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

Issue 23681011: Android: splits cache_control and perf_control. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More files Created 7 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 | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 values: A list of numeric measured values. An N-dimensional list will be 99 values: A list of numeric measured values. An N-dimensional list will be
100 flattened and treated as a simple list. 100 flattened and treated as a simple list.
101 units: A description of the units of measure, e.g. "bytes". 101 units: A description of the units of measure, e.g. "bytes".
102 result_type: Accepts values of perf_result_data_type.ALL_TYPES. 102 result_type: Accepts values of perf_result_data_type.ALL_TYPES.
103 print_to_stdout: If True, prints the output in stdout instead of returning 103 print_to_stdout: If True, prints the output in stdout instead of returning
104 the output to caller. 104 the output to caller.
105 105
106 Returns: 106 Returns:
107 String of the formated perf result. 107 String of the formated perf result.
108 """ 108 """
109 assert (perf_result_data_type.IsValidType(result_type), 109 assert perf_result_data_type.IsValidType(result_type), \
110 'result type: %s is invalid' % result_type) 110 'result type: %s is invalid' % result_type
111 111
112 trace_name = _EscapePerfResult(trace) 112 trace_name = _EscapePerfResult(trace)
113 113
114 if (result_type == perf_result_data_type.UNIMPORTANT or 114 if (result_type == perf_result_data_type.UNIMPORTANT or
115 result_type == perf_result_data_type.DEFAULT or 115 result_type == perf_result_data_type.DEFAULT or
116 result_type == perf_result_data_type.INFORMATIONAL): 116 result_type == perf_result_data_type.INFORMATIONAL):
117 assert isinstance(values, list) 117 assert isinstance(values, list)
118 assert len(values) 118 assert len(values)
119 assert '/' not in measurement 119 assert '/' not in measurement
120 value, avg, sd = _MeanAndStdDevFromList(_Flatten(values)) 120 value, avg, sd = _MeanAndStdDevFromList(_Flatten(values))
(...skipping 21 matching lines...) Expand all
142 avg, sd = GeomMeanAndStdDevFromHistogram(value) 142 avg, sd = GeomMeanAndStdDevFromHistogram(value)
143 143
144 if avg: 144 if avg:
145 output += '\nAvg %s: %f%s' % (measurement, avg, units) 145 output += '\nAvg %s: %f%s' % (measurement, avg, units)
146 if sd: 146 if sd:
147 output += '\nSd %s: %f%s' % (measurement, sd, units) 147 output += '\nSd %s: %f%s' % (measurement, sd, units)
148 if print_to_stdout: 148 if print_to_stdout:
149 print output 149 print output
150 sys.stdout.flush() 150 sys.stdout.flush()
151 return output 151 return output
OLDNEW
« no previous file with comments | « build/android/surface_stats.py ('k') | tools/telemetry/telemetry/core/platform/android_platform_backend.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698