diff --git a/scripts/advanced_statistics.py b/scripts/advanced_statistics.py index 58500ac..d825be5 100755 --- a/scripts/advanced_statistics.py +++ b/scripts/advanced_statistics.py @@ -31,6 +31,8 @@ for command, ts in zip(commands, times): print() print(" percentiles:") print(" P_05 .. P_95: {:.3f} s .. {:.3f} s".format(p05, p95)) - print(" P_25 .. P_75: {:.3f} s .. {:.3f} s " - "(IQR = {:.3f} s)".format(p25, p75, iqr)) + print( + " P_25 .. P_75: {:.3f} s .. {:.3f} s " + "(IQR = {:.3f} s)".format(p25, p75, iqr) + ) print() diff --git a/scripts/plot_histogram.py b/scripts/plot_histogram.py index 7e9e8b2..277b526 100755 --- a/scripts/plot_histogram.py +++ b/scripts/plot_histogram.py @@ -18,12 +18,14 @@ with open(args.file) as f: commands = [b["command"] for b in results] all_times = [b["times"] for b in results] -plt.hist(all_times, - label=commands, - bins="auto", - histtype="bar", - range=(np.min(all_times), np.max(all_times))) -plt.legend(prop={'family': ['Source Code Pro', 'Fira Mono', 'Courier New']}) +plt.hist( + all_times, + label=commands, + bins="auto", + histtype="bar", + range=(np.min(all_times), np.max(all_times)), +) +plt.legend(prop={"family": ["Source Code Pro", "Fira Mono", "Courier New"]}) plt.xlabel("Time [s]") if args.title: diff --git a/scripts/plot_parametrized.py b/scripts/plot_parametrized.py index 17c417e..82170a2 100755 --- a/scripts/plot_parametrized.py +++ b/scripts/plot_parametrized.py @@ -9,8 +9,12 @@ import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("file", help="JSON file with benchmark results", nargs="+") -parser.add_argument("--parameter-name", metavar="name", type=str, - help="Name of the parameter / x-axis label") +parser.add_argument( + "--parameter-name", + metavar="name", + type=str, + help="Name of the parameter / x-axis label", +) args = parser.parse_args() for filename in args.file: @@ -21,10 +25,7 @@ for filename in args.file: times_mean = [b["mean"] for b in results] times_stddev = [b["stddev"] for b in results] - plt.errorbar(x=parameter_values, - y=times_mean, - yerr=times_stddev, - capsize=2) + plt.errorbar(x=parameter_values, y=times_mean, yerr=times_stddev, capsize=2) plt.xlabel(args.parameter_name) plt.ylabel("Time [s]") diff --git a/scripts/plot_whisker.py b/scripts/plot_whisker.py index fd9ad96..c2ca7e7 100755 --- a/scripts/plot_whisker.py +++ b/scripts/plot_whisker.py @@ -15,7 +15,9 @@ import matplotlib.pyplot as plt parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("file", help="JSON file with benchmark results") parser.add_argument("--title", help="Plot Title") -parser.add_argument("--labels", help="Comma-separated list of entries for the plot legend") +parser.add_argument( + "--labels", help="Comma-separated list of entries for the plot legend" +) args = parser.parse_args() with open(args.file) as f: diff --git a/scripts/welch_ttest.py b/scripts/welch_ttest.py index eaea55f..30071a4 100755 --- a/scripts/welch_ttest.py +++ b/scripts/welch_ttest.py @@ -33,7 +33,6 @@ print("t = {:.3}, p = {:.3}".format(t, p)) print() if dispose: - print("There is a difference between the " - "two benchmarks (p < {}).".format(th)) + print("There is a difference between the two benchmarks (p < {}).".format(th)) else: print("The two benchmarks are almost the same (p >= {}).".format(th))