aboutsummaryrefslogtreecommitdiff
path: root/bench.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-03-25 17:49:39 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-03-25 17:49:39 +0100
commit25c4d81069f576354d0279bf38417c236e924540 (patch)
treee5b953bc96220f07c86bf01ac0f900751b08543e /bench.py
parent5c4ee34ec788ab0a59fe10c125452323d4b67d98 (diff)
downloadallocbench-25c4d81069f576354d0279bf38417c236e924540.tar.gz
allocbench-25c4d81069f576354d0279bf38417c236e924540.zip
move benchmark definitions into src/benchmarks
bench now loads all *.py files from src/benchmarks as benchmarks
Diffstat (limited to 'bench.py')
-rwxr-xr-xbench.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bench.py b/bench.py
index 412597f..90bd0bf 100755
--- a/bench.py
+++ b/bench.py
@@ -14,7 +14,9 @@ import src.globalvars
from src.util import *
-benchmarks = ["loop", "mysql", "falsesharing", "dj_trace", "larson"]
+bench_dir = "src/benchmarks"
+benchmarks = [e[:-3] for e in os.listdir(bench_dir)
+ if e[-3:] == ".py" and e != "__init__.py"]
parser = argparse.ArgumentParser(description="benchmark memory allocators")
parser.add_argument("-ds, --dont-save", action='store_true', dest="dont_save",
@@ -143,7 +145,7 @@ def main():
continue
try:
- bench = eval("importlib.import_module('src.{0}').{0}".format(bench))
+ bench = eval("importlib.import_module('src.benchmarks.{0}').{0}".format(bench))
if args.load:
bench.load(path=args.load)