aboutsummaryrefslogtreecommitdiff
path: root/bench.py
diff options
context:
space:
mode:
Diffstat (limited to 'bench.py')
-rwxr-xr-xbench.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bench.py b/bench.py
index 36ea5ec..c7d70f7 100755
--- a/bench.py
+++ b/bench.py
@@ -2,24 +2,27 @@
import argparse
-from bench_loop import loop
-from bench_conprod import conprod
-from bench_mysql import mysql
+from loop import loop
+# from bench_conprod import conprod
+from mysql import mysql
parser = argparse.ArgumentParser(description="benchmark memory allocators")
parser.add_argument("-s", "--save", help="save benchmark results to disk", action='store_true')
parser.add_argument("-l", "--load", help="load benchmark results from disk", action='store_true')
parser.add_argument("-r", "--runs", help="how often the benchmarks run", default=3, type=int)
parser.add_argument("-v", "--verbose", help="more output", action='store_true')
+parser.add_argument("-b", "--benchmarks", help="benchmarks to run", nargs='+')
-benchmarks = [loop, conprod, mysql]
+benchmarks = [loop, mysql]
def main():
args = parser.parse_args()
print (args)
for bench in benchmarks:
+ if args.benchmarks and not bench.name in args.benchmarks:
+ continue
if args.load:
bench.load()