Skip to content

Commit 05c25d3

Browse files
cosminbascamsimacek
authored andcommitted
mx_graalpython_bisect.py: add WORKS criterion to bisect job
1 parent 6566000 commit 05c25d3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bisect-benchmark.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ good = 1234cafebabe
3838
enterprise = true
3939

4040
# Which result parameter should be used for comparisons, one of BEST, WORST,
41-
# AVG (all runs), AVG (no warmup)
41+
# AVG (all runs), AVG (no warmup), WORKS (bench failures are treated as
42+
# regressions)
4243
benchmark_criterion = BEST

mx.graalpython/mx_graalpython_bisect.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,12 @@ def benchmark_callback(suite, commit):
238238
output = mx.OutputCapture()
239239
retcode = mx.run(shlex.split(args.benchmark_command), out=mx.TeeOutputCapture(output), nonZeroIsFatal=False)
240240
if retcode:
241-
raise RuntimeError("Failed to execute benchmark for {}".format(commit))
241+
if args.benchmark_criterion == 'WORKS':
242+
return sys.maxsize
243+
else:
244+
raise RuntimeError("Failed to execute benchmark for {}".format(commit))
245+
elif args.benchmark_criterion == 'WORKS':
246+
return 0
242247
match = re.search(r'{}.*duration: ([\d.]+)'.format(re.escape(args.benchmark_criterion)), output.data)
243248
if not match:
244249
raise RuntimeError("Failed to get result from the benchmark")

0 commit comments

Comments
 (0)