Skip to content

Commit 6502cd1

Browse files
committed
Benchmark bisect: use ';' as re-run commands separator & style fix
1 parent 7493c61 commit 6502cd1

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

bisect-benchmark.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ benchmark_command = mx --dy /compiler benchmark micro:try-except-simple
3030
# Once the good and bad commits are identified, the tool will run all the
3131
# following benchmark commands on both the good and bad revisions. One can
3232
# run the benchmarks again with some extra logging, IGV dumping, ...
33+
#
34+
# Individual commands can be separated by ';'. Trailing whitespace including
35+
# newlines is removed from the commands.
36+
#
3337
# The example commands below are good default that should provide good insight
3438
# into the regression at hand:
3539
# * "--checkup" runs the benchmark with extra iterations, and extra compilation
@@ -39,9 +43,9 @@ benchmark_command = mx --dy /compiler benchmark micro:try-except-simple
3943
# * "--cputracer" and IGV dumping: they filter the roots with name "*measure*",
4044
# adjust that to the benchmark main function(s)
4145
rerun_with_commands =
42-
mx --dy /compiler benchmark micro:try-except-simple -- --checkup |
43-
mx --dy /compiler benchmark micro:try-except-simple -- --cpusampler --cpusampler.Delay=10000 |
44-
mx --dy /compiler benchmark micro:try-except-simple -- --cputracer --cputracer.TraceStatements --cputracer.FilterRootName=measure |
46+
mx --dy /compiler benchmark micro:try-except-simple -- --checkup ;
47+
mx --dy /compiler benchmark micro:try-except-simple -- --cpusampler --cpusampler.Delay=10000 ;
48+
mx --dy /compiler benchmark micro:try-except-simple -- --cputracer --cputracer.TraceStatements --cputracer.FilterRootName=measure ;
4549
mx --dy /compiler benchmark micro:try-except-simple -- --vm.Dgraal.Dump=Truffle:2 --vm.Dgraal.MethodFilter="*measure*"
4650

4751
# The first known "bad" merge commit for bisection. Try to use long commit

mx.graalpython/mx_graalpython_bisect.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@
4747
import mx
4848

4949

50-
def hr(l):
50+
def print_line(l):
5151
print('=' * l)
5252

53+
5354
def get_suite(name):
5455
suite_name = name.lstrip('/')
5556
suite = mx.suite(suite_name, fatalIfMissing=False)
@@ -199,7 +200,7 @@ def _bisect_benchmark(argv, bisect_id, email_to):
199200
help="Command to run in order to run the benchmark. Output needs to be in mx's format")
200201
parser.add_argument('--rerun-with-commands',
201202
help="Re-run the bad and good commits with this benchmark command(s) "
202-
"(multiple commands separated by '|')")
203+
"(multiple commands separated by ';')")
203204
parser.add_argument('--benchmark-criterion', default='BEST',
204205
help="Which result parameter should be used for comparisons")
205206
parser.add_argument('--enterprise', action='store_true', help="Whether to checkout graal-enterprise")
@@ -283,11 +284,11 @@ def benchmark_callback(suite, commit, bench_command=args.benchmark_command):
283284
current_result = next_result
284285
current_suite = downstream_suite
285286
for commit in [current_result.good_commit, current_result.bad_commit]:
286-
hr(80)
287+
print_line(80)
287288
print("Commit: {}".format(commit))
288289
checkout_and_build_suite(current_suite, commit)
289-
for cmd in args.rerun_with_commands.split("|"):
290-
hr(40)
290+
for cmd in args.rerun_with_commands.split(";"):
291+
print_line(40)
291292
mx.run(shlex.split(cmd.strip()), nonZeroIsFatal=False)
292293

293294
send_email(

0 commit comments

Comments
 (0)