aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2018-09-08 21:13:10 -0400
committerDeterminant <ted.sybil@gmail.com>2018-09-08 21:13:10 -0400
commit4d30bae0a66778ce4dd05bd8b3706419f401a9b4 (patch)
treeeaef52a84b2aa3f3f0509a07428ed8c2b1dbe287 /scripts
parent82d041d9f7881fa23e2999dad636eedaa20217a5 (diff)
...
Diffstat (limited to 'scripts')
-rw-r--r--scripts/thr_hist.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/thr_hist.py b/scripts/thr_hist.py
index b6ef40a..6f385e5 100644
--- a/scripts/thr_hist.py
+++ b/scripts/thr_hist.py
@@ -39,8 +39,9 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--interval', type=float, default=1, required=False)
parser.add_argument('--output', type=str, default="hist.png", required=False)
+ parser.add_argument('--plot', action='store_true')
args = parser.parse_args()
- commit_pat = re.compile('([^[].*) \[hotstuff info\] ([0-9.]*) [0-9.]*$')
+ commit_pat = re.compile('([^[].*) \[hotstuff info\] ([0-9.]*)$')
interval = args.interval
begin_time = None
next_begin_time = None
@@ -68,4 +69,5 @@ if __name__ == '__main__':
print("lat = {:.3f}ms".format(sum(lats) / len(lats) * 1e3))
lats, _ = remove_outliers(lats)
print("lat = {:.3f}ms".format(sum(lats) / len(lats) * 1e3))
- plot_thr(args.output)
+ if args.plot:
+ plot_thr(args.output)