diff options
| author | J08nY | 2017-12-28 18:54:19 +0100 |
|---|---|---|
| committer | J08nY | 2017-12-28 18:54:19 +0100 |
| commit | 70bcab713bcc36f3f6a5886f4651967e1585fad6 (patch) | |
| tree | 267a034a146216cd4b4e0f2aa605040a1059f1f2 /util/plot_dh.py | |
| parent | 552289fd86446416eefec6356659a8333d091f79 (diff) | |
| download | ECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.tar.gz ECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.tar.zst ECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.zip | |
Diffstat (limited to 'util/plot_dh.py')
| -rwxr-xr-x | util/plot_dh.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/util/plot_dh.py b/util/plot_dh.py index eb1886a..62a2f86 100755 --- a/util/plot_dh.py +++ b/util/plot_dh.py @@ -12,6 +12,7 @@ import numpy as np import matplotlib.pyplot as plt +import matplotlib.ticker as ticker import argparse from operator import itemgetter @@ -34,9 +35,16 @@ if __name__ == "__main__": fig.suptitle(opts.file) axe_hist = fig.add_subplot(1,1,1) - axe_hist.hist(time_data, bins=400, log=True) + time_max = max(time_data) + time_avg = np.average(time_data) + time_median = np.median(time_data) + axe_hist.hist(time_data, bins=time_max/3, log=True) + axe_hist.axvline(x=time_avg, alpha=0.7, linestyle="dotted", color="red", label="avg = {}".format(time_avg)) + axe_hist.axvline(x=time_median, alpha=0.7, linestyle="dotted", color="green", label="median = {}".format(time_median)) axe_hist.set_ylabel("count\n(log)") axe_hist.set_xlabel("time (ms)") + axe_hist.xaxis.set_major_locator(ticker.MaxNLocator()) + axe_hist.legend(loc="best") if opts.output is None: plt.show() |
