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

Side by Side Diff: bench/check_bench_regressions.py

Issue 214913005: Adds bench expectations to expectations/bench; fixes bench alert test's dependency on script line n… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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 | expectations/bench/bench_expectations_Perf-Android-Nexus10-MaliT604-Arm7-Release.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ''' 1 '''
2 Created on May 16, 2011 2 Created on May 16, 2011
3 3
4 @author: bungeman 4 @author: bungeman
5 ''' 5 '''
6 import bench_util 6 import bench_util
7 import getopt 7 import getopt
8 import httplib 8 import httplib
9 import itertools 9 import itertools
10 import json 10 import json
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ratios.sort(reverse=True) 168 ratios.sort(reverse=True)
169 li = [] 169 li = []
170 for ratio in ratios: 170 for ratio in ratios:
171 li.extend(exceptions[i][ratio]) 171 li.extend(exceptions[i][ratio])
172 header = '%s benches got slower (sorted by %% difference):' % len(li) 172 header = '%s benches got slower (sorted by %% difference):' % len(li)
173 if i == FASTER: 173 if i == FASTER:
174 header = header.replace('slower', 'faster') 174 header = header.replace('slower', 'faster')
175 outputs.extend(['', header] + li) 175 outputs.extend(['', header] + li)
176 176
177 if outputs: 177 if outputs:
178 raise Exception('\n'.join(outputs)) 178 # Directly raising Exception will have stderr outputs tied to the line
179 # number of the script, so use sys.stderr.write() instead.
180 # Add a trailing newline to supress new line checking errors.
181 sys.stderr.write('\n'.join(['Exception:'] + outputs + ['\n']))
182 exit(1)
179 183
180 184
181 def main(): 185 def main():
182 """Parses command line and checks bench expectations.""" 186 """Parses command line and checks bench expectations."""
183 try: 187 try:
184 opts, _ = getopt.getopt(sys.argv[1:], 188 opts, _ = getopt.getopt(sys.argv[1:],
185 "a:b:d:e:r:", 189 "a:b:d:e:r:",
186 "default-setting=") 190 "default-setting=")
187 except getopt.GetoptError, err: 191 except getopt.GetoptError, err:
188 print str(err) 192 print str(err)
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 data_points = bench_util.parse_skp_bench_data(directory, rev, rep) 227 data_points = bench_util.parse_skp_bench_data(directory, rev, rep)
224 228
225 bench_dict = create_bench_dict(data_points) 229 bench_dict = create_bench_dict(data_points)
226 230
227 if bench_expectations: 231 if bench_expectations:
228 check_expectations(bench_dict, bench_expectations, platform_and_alg) 232 check_expectations(bench_dict, bench_expectations, platform_and_alg)
229 233
230 234
231 if __name__ == "__main__": 235 if __name__ == "__main__":
232 main() 236 main()
OLDNEW
« no previous file with comments | « no previous file | expectations/bench/bench_expectations_Perf-Android-Nexus10-MaliT604-Arm7-Release.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698