From 2cf0d2b0a78f690cad11a3d0b372b02cc7e5efc7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 7 Oct 2019 09:35:32 +0200 Subject: generate-dfa-benchmark: skip compilation attempt for >1000 runs --- bin/generate-dfa-benchmark.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py index 9c783b7..7f67e1b 100755 --- a/bin/generate-dfa-benchmark.py +++ b/bin/generate-dfa-benchmark.py @@ -173,15 +173,18 @@ def run_benchmark(application_file: str, pta: PTA, runs: list, arch: str, app: s run_timeout *= repeat needs_split = False - try: - runner.build(arch, app, run_args) - except RuntimeError: - if len(runs) > 50: - # Application is too large -> split up runs - needs_split = True - else: - # Unknown error - raise + if len(runs) > 1000: + needs_split = True + else: + try: + runner.build(arch, app, run_args) + except RuntimeError: + if len(runs) > 50: + # Application is too large -> split up runs + needs_split = True + else: + # Unknown error + raise # This has been deliberately taken out of the except clause to avoid nested exception handlers # (they lead to pretty interesting tracebacks which are probably more confusing than helpful) -- cgit v1.2.3