aboutsummaryrefslogtreecommitdiff
path: root/bench.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-05-30 12:52:12 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-06-02 11:18:47 +0200
commit644f75039a9ef4bf59e0ca633c9d59fd849c943a (patch)
treeb9618b36d761849ad079e81055be5e2cf4c3eb10 /bench.py
parent50c66a1a4f40f069fb3706602025f53952c5cc33 (diff)
downloadallocbench-644f75039a9ef4bf59e0ca633c9d59fd849c943a.tar.gz
allocbench-644f75039a9ef4bf59e0ca633c9d59fd849c943a.zip
[benchmarks] reintroduce prepare
Always running the possibly very expensive preparation code when a benchmark object is created is not reasonable when benchmarks should only be summarized.
Diffstat (limited to 'bench.py')
-rwxr-xr-xbench.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bench.py b/bench.py
index adecc89..6a23cd0 100755
--- a/bench.py
+++ b/bench.py
@@ -181,14 +181,13 @@ def main():
print_error(f"Skipping {bench}! Loading failed.")
continue
- try:
- print_status("Preparing", bench, "...")
- bench = member()
- break
- except Exception:
- print_error(traceback.format_exc())
- print_error(f"Skipping {bench}! Preparing failed.")
- continue
+ try:
+ print_status("Preparing", bench, "...")
+ bench.prepare()
+ except Exception:
+ print_error(traceback.format_exc())
+ print_error(f"Skipping {bench}! Preparing failed.")
+ continue
if args.analyze:
analyze_bench(bench)