blob: b7b65925f8e01da344f14dc749b87587b4c131cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()
|