aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-09-11 17:13:07 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-09-11 17:29:14 +0200
commitc36a2b00e6a487f988a7286ccb9c8968a937f30c (patch)
tree3e16cb12d83d403851a7672889925c3d21453cae
parentfa133027c5489c66646adfa50fd4659618f443a9 (diff)
downloadallocbench-c36a2b00e6a487f988a7286ccb9c8968a937f30c.tar.gz
allocbench-c36a2b00e6a487f988a7286ccb9c8968a937f30c.zip
abort if there are no allocators to benchmark
-rwxr-xr-xbench.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bench.py b/bench.py
index 5144459..02e95c7 100755
--- a/bench.py
+++ b/bench.py
@@ -121,6 +121,10 @@ def main():
print_info("Allocators:", *src.globalvars.allocators.keys())
print_debug("Allocators:", *src.globalvars.allocators.items())
+ if src.globalvars.allocators == {}:
+ print_error("Abort because there are no allocators to benchmark")
+ exit(1)
+
# collect facts about benchmark environment
src.facter.collect_facts()