import sys import re import argparse from datetime import datetime, timedelta def str2datetime(s): parts = s.split('.') dt = datetime.strptime(parts[0], "%Y-%m-%d %H:%M:%S") return dt.replace(microsecond=int(parts[1])) def plot_thr(fname): import matplotlib.pyplot as plt x = range(len(values)) y = values plt.xlabel(r"time") plt.ylabel(r"tx/sec") plt.plot(x, y) plt.show() plt.savefig(fname) 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) args = parser.parse_args() commit_pat = re.compile('([^[].*) \[hotstuff info\].*got