diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-03-25 17:49:39 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-03-25 17:49:39 +0100 |
| commit | 25c4d81069f576354d0279bf38417c236e924540 (patch) | |
| tree | e5b953bc96220f07c86bf01ac0f900751b08543e /bench.py | |
| parent | 5c4ee34ec788ab0a59fe10c125452323d4b67d98 (diff) | |
| download | allocbench-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-x | bench.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |
