def main(args): """Program Entry Point Take two benchmark output files and compare their timings. """ if len(args) > 4 or len(args) < 3: print('Usage: %s <schema> <file1> <file2> [threshold in %%]' % sys.argv[0]) sys.exit(os.EX_USAGE) bench1 = bench.parse_bench(args[1], args[0]) bench2 = bench.parse_bench(args[2], args[0]) if len(args) == 4: threshold = float(args[3]) else: threshold = 10.0 if (bench1['timing_type'] != bench2['timing_type']): print('Cannot compare benchmark outputs: timing types are different') return plot_graphs(bench1, bench2) bench.compress_timings(bench1) bench.compress_timings(bench2) compare_runs(bench1, bench2, threshold)
def main(bench1, bench2, schema, threshold, stats): bench1 = bench.parse_bench(bench1, schema) bench2 = bench.parse_bench(bench2, schema) plot_graphs(bench1, bench2) bench.compress_timings(bench1) bench.compress_timings(bench2) compare_runs(bench1, bench2, threshold, stats)
def main(bench1, bench2, schema, threshold, stats): bench1 = bench.parse_bench(bench1, schema) bench.do_for_all_timings( bench1, lambda b, f, v: b['functions'][f][v]['timings'].sort()) bench2 = bench.parse_bench(bench2, schema) bench.do_for_all_timings( bench2, lambda b, f, v: b['functions'][f][v]['timings'].sort()) plot_graphs(bench1, bench2) bench.compress_timings(bench1) bench.compress_timings(bench2) compare_runs(bench1, bench2, threshold, stats)