From cdfd77af6e6ca5f4352d42573a33d51c09eba5b3 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 29 Apr 2019 17:12:41 +0200 Subject: move list of available benchmarks to src.globalvars.benchmarks fix analyse --- bench.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'bench.py') diff --git a/bench.py b/bench.py index f7a513e..8fe7850 100755 --- a/bench.py +++ b/bench.py @@ -14,10 +14,6 @@ import src.globalvars from src.util import * -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", help="don't save benchmark results in RESULTDIR") @@ -141,7 +137,7 @@ def main(): # TODO load all results at once cwd = os.getcwd() - for bench in benchmarks: + for bench in src.globalvars.benchmarks: if args.benchmarks and not bench in args.benchmarks: continue @@ -170,7 +166,7 @@ def main(): old_allocs = bench.allocators # use malt as allocator - src.globalvars.allocators = {"malt": {"cmd_prefix" : malt_cmd, + bench.allocators = {"malt": {"cmd_prefix" : malt_cmd, "binary_suffix" : "", "LD_PRELOAD" : ""}} try: @@ -189,6 +185,8 @@ def main(): else: print_error("malt not found. Skipping analyse.") + if args.runs > 1: + print_status("Running", bench.name, "...") bench.run(runs=args.runs) if need_resultdir: -- cgit v1.2.3