Skip to content

Commit 8b336e9

Browse files
authored
No longer use ASV --strict. (SciTools#5496)
1 parent 2280490 commit 8b336e9

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

benchmarks/bm_runner.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232

3333
# Common ASV arguments for all run_types except `custom`.
3434
ASV_HARNESS = (
35-
"run {posargs} --attribute rounds=4 --interleave-rounds --strict "
36-
"--show-stderr"
35+
"run {posargs} --attribute rounds=4 --interleave-rounds --show-stderr"
3736
)
3837

3938

@@ -501,14 +500,19 @@ def csperf(
501500
asv_command = (
502501
ASV_HARNESS.format(posargs=commit_range) + f" --bench={run_type}"
503502
)
504-
# C/SPerf benchmarks are much bigger than the CI ones:
505-
# Don't fail the whole run if memory blows on 1 benchmark.
506-
asv_command = asv_command.replace(" --strict", "")
503+
507504
# Only do a single round.
508505
asv_command = shlex.split(
509506
re.sub(r"rounds=\d", "rounds=1", asv_command)
510507
)
511-
_subprocess_runner([*asv_command, *args.asv_args], asv=True)
508+
try:
509+
_subprocess_runner([*asv_command, *args.asv_args], asv=True)
510+
except subprocess.CalledProcessError as err:
511+
# C/SPerf benchmarks are much bigger than the CI ones:
512+
# Don't fail the whole run if memory blows on 1 benchmark.
513+
# ASV produces return code of 2 if the run includes crashes.
514+
if err.returncode != 2:
515+
raise
512516

513517
asv_command = shlex.split(
514518
f"publish {commit_range} --html-dir={publish_subdir}"

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ This document explains the changes made to Iris for this release
7979
working properly. (Main pull request: :pull:`5437`, more detail:
8080
:pull:`5430`, :pull:`5431`, :pull:`5432`, :pull:`5434`, :pull:`5436`)
8181

82+
#. `@trexfeathers`_ adapted benchmarking to work with ASV ``>=v0.6`` by no
83+
longer using the ``--strict`` argument. (:pull:`5496`)
84+
8285

8386
.. comment
8487
Whatsnew author names (@github name) in alphabetical order. Note that,

0 commit comments

Comments
 (0)