From 0d6091831f64ebcb28fe4f495ca21815f0ddb0a6 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 15 Jul 2018 16:19:26 +0200 Subject: add initial mysql, loop and consumer/producer benchmarks --- bench.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 bench.py (limited to 'bench.py') diff --git a/bench.py b/bench.py new file mode 100755 index 0000000..b7b6592 --- /dev/null +++ b/bench.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 + +from bench_loop import loop +from bench_conprod import conprod +from bench_mysql import mysql + +benchmarks = [loop, conprod, mysql] + +def main(): + for bench in benchmarks: + print("Preparing", bench.name) + if not bench.prepare(): + continue + print("Running", bench.name) + if not bench.run(runs=1): + continue + print("Summarizing", bench.name) + bench.summary() + if hasattr(bench, "cleanup"): + print("Cleaning after", bench.name) + bench.cleanup() + +if __name__ == "__main__": + main() -- cgit v1.2.3