aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbench.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bench.py b/bench.py
index 570258a..e877052 100755
--- a/bench.py
+++ b/bench.py
@@ -36,10 +36,11 @@ def main():
if args.load:
bench.load()
- print("Preparing", bench.name, "...")
- if not bench.prepare():
- print("Preparing", bench.name, "failed!")
- return
+ if args.runs > 0 or args.analyse:
+ print("Preparing", bench.name, "...")
+ if not bench.prepare():
+ print("Preparing", bench.name, "failed!")
+ return
if args.analyse and hasattr(bench, "analyse") and callable(bench.analyse):
print("Analysing", bench.name, "...")
@@ -56,7 +57,7 @@ def main():
print("Summarizing", bench.name, "...")
bench.summary(args.summarydir)
- if hasattr(bench, "cleanup"):
+ if (args.runs > 0 or args.analyse) and hasattr(bench, "cleanup"):
print("Cleaning up", bench.name, "...")
bench.cleanup()