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

Side by Side Diff: build/android/perf_tests_helper.py

Issue 8667008: Fix python scripts in src/build/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # 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
4 # found in the LICENSE file. 3 # found in the LICENSE file.
5 4
6 import re 5 import re
7 6
8 7
9 def _EscapePerfResult(s): 8 def _EscapePerfResult(s):
10 """Escapes |s| for use in a perf result.""" 9 """Escapes |s| for use in a perf result."""
11 # Colons (:) and equal signs (=) are not allowed, and we chose an arbitrary 10 # Colons (:) and equal signs (=) are not allowed, and we chose an arbitrary
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 47
49 output = '%sRESULT %s: %s= %s %s' % (important_marker, 48 output = '%sRESULT %s: %s= %s %s' % (important_marker,
50 _EscapePerfResult(measurement), 49 _EscapePerfResult(measurement),
51 _EscapePerfResult(trace), 50 _EscapePerfResult(trace),
52 value, units) 51 value, units)
53 if avg: 52 if avg:
54 output += '\nAvg %s: %d%s' % (measurement, avg, units) 53 output += '\nAvg %s: %d%s' % (measurement, avg, units)
55 if print_to_stdout: 54 if print_to_stdout:
56 print output 55 print output
57 return output 56 return output
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698