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

Side by Side Diff: tools/run_perf.py

Issue 2113453007: [Android] Switch outdated pylib.* references to equivalent devil.android.* ones. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 Performance runner for d8. 7 Performance runner for d8.
8 8
9 Call e.g. with tools/run-perf.py --arch ia32 some_suite.json 9 Call e.g. with tools/run-perf.py --arch ia32 some_suite.json
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 "nacl_x64", 117 "nacl_x64",
118 "x64", 118 "x64",
119 "arm64"] 119 "arm64"]
120 120
121 GENERIC_RESULTS_RE = re.compile(r"^RESULT ([^:]+): ([^=]+)= ([^ ]+) ([^ ]*)$") 121 GENERIC_RESULTS_RE = re.compile(r"^RESULT ([^:]+): ([^=]+)= ([^ ]+) ([^ ]*)$")
122 RESULT_STDDEV_RE = re.compile(r"^\{([^\}]+)\}$") 122 RESULT_STDDEV_RE = re.compile(r"^\{([^\}]+)\}$")
123 RESULT_LIST_RE = re.compile(r"^\[([^\]]+)\]$") 123 RESULT_LIST_RE = re.compile(r"^\[([^\]]+)\]$")
124 TOOLS_BASE = os.path.abspath(os.path.dirname(__file__)) 124 TOOLS_BASE = os.path.abspath(os.path.dirname(__file__))
125 125
126 126
127 def LoadAndroidBuildTools(path): # pragma: no cover 127 def LoadAndroidBuildTools(path): # pragma: no cover
Michael Achenbach 2016/07/05 10:16:39 Does the path now need to point to src/third_party
jbudorick 2016/07/07 17:12:03 devil_chromium takes care of that part. I could ch
128 assert os.path.exists(path) 128 assert os.path.exists(path)
129 sys.path.insert(0, path) 129 sys.path.insert(0, path)
130 130
131 from pylib.device import adb_wrapper # pylint: disable=F0401 131 import devil_chromium
132 from pylib.device import device_errors # pylint: disable=F0401 132 from devil.android import device_errors # pylint: disable=import-error
133 from pylib.device import device_utils # pylint: disable=F0401 133 from devil.android import device_utils # pylint: disable=import-error
134 from pylib.perf import cache_control # pylint: disable=F0401 134 from devil.android.sdk import adb_wrapper # pylint: disable=import-error
135 from pylib.perf import perf_control # pylint: disable=F0401 135 from devil.android.perf import cache_control # pylint: disable=import-error
136 from devil.android.perf import perf_control # pylint: disable=import-error
136 global adb_wrapper 137 global adb_wrapper
137 global cache_control 138 global cache_control
138 global device_errors 139 global device_errors
139 global device_utils 140 global device_utils
140 global perf_control 141 global perf_control
141 142
143 devil_chromium.Initialize()
144
142 145
143 def GeometricMean(values): 146 def GeometricMean(values):
144 """Returns the geometric mean of a list of values. 147 """Returns the geometric mean of a list of values.
145 148
146 The mean is calculated using log to avoid overflow. 149 The mean is calculated using log to avoid overflow.
147 """ 150 """
148 values = map(float, values) 151 values = map(float, values)
149 return str(math.exp(sum(map(math.log, values)) / len(values))) 152 return str(math.exp(sum(map(math.log, values)) / len(values)))
150 153
151 154
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 1074
1072 if options.json_test_results_no_patch: 1075 if options.json_test_results_no_patch:
1073 results_no_patch.WriteToFile(options.json_test_results_no_patch) 1076 results_no_patch.WriteToFile(options.json_test_results_no_patch)
1074 else: # pragma: no cover 1077 else: # pragma: no cover
1075 print results_no_patch 1078 print results_no_patch
1076 1079
1077 return min(1, len(results.errors)) 1080 return min(1, len(results.errors))
1078 1081
1079 if __name__ == "__main__": # pragma: no cover 1082 if __name__ == "__main__": # pragma: no cover
1080 sys.exit(Main(sys.argv[1:])) 1083 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698