def main():
# # Vary the delays (in miilseconds) on the links
link_latencies = [0]#[5, 10, 15, 20, 25]
# Vary the the amount of 'load' that is running by modifying the background emulation threads
background_specs = [0]#[0, 10, 20, 30, 40]
evaluation_type = "replay"
script_dir = os.path.dirname(os.path.realpath(__file__))
idx = script_dir.index('NetPower_TestBed')
base_dir = script_dir[0:idx] + "NetPower_TestBed"
bro_dnp3_parser_dir = base_dir + "/dnp3_timing/dnp3_parser_bro/"
# bro_json_log_conf = "/usr/local/bro/share/bro/policy/tuning/json-logs.bro"
bro_json_log_conf = "/home/rakesh/bro/scripts/policy/tuning/json-logs.bro"
# bro_cmd = "/usr/local/bro/bin/bro"
bro_cmd = "/usr/bin/bro"
p = PCAPPostProcessing(base_dir, bro_cmd, bro_json_log_conf, bro_dnp3_parser_dir,
link_latencies, background_specs, evaluation_type)
p.collect_data()
for series in ["mean", "sd", "sem"]:
p.plot_data(series)
# plt.hist(p.data['0']['5'], bins=40, histtype="step")
# plt.hist(p.data['0']['10'], bins=40, histtype="step")
# plt.hist(p.data['0']['15'], bins=40, histtype="step")
# plt.hist(p.data['0']['20'], bins=40, histtype="step")
# plt.hist(p.data['0']['25'], bins=40, histtype="step")
#
# plt.show()
#p.process_plotly()
pcap_post_processing.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录