Compare commits
2 Commits
0471251edf
...
7ec00ce989
Author | SHA1 | Date |
---|---|---|
0xFugue | 7ec00ce989 | |
0xFugue | 35612738b2 |
|
@ -60,7 +60,7 @@ def compute_view_finalisation_times(df, conf, oprefix, simtype, tag="tag", plot=
|
|||
#two3rd = math.floor(conf["node_count"] * 3/3)
|
||||
|
||||
# for view_offset^th view, last view_offset number of views will need to be omitted
|
||||
view_offset = 1
|
||||
view_offset = 2
|
||||
#views, view2fin_time = df.current_view.unique()[:-2], {}
|
||||
views, view2fin_time = df.current_view.unique()[:-view_offset], {}
|
||||
log.debug(f'views: {conf["stream_settings"]["path"]} {views}, {df.current_view.unique()}')
|
||||
|
@ -104,16 +104,18 @@ def compute_view_times(path, oprefix, otype):
|
|||
tag = os.path.splitext(os.path.basename(conf))[0]
|
||||
#cfile, dfile = f'{path}/configs/{conf}', f'{path}/output/{tag}.csv'
|
||||
cfile, dfile = f'{conf}', f'{path}/output/{tag}.csv'
|
||||
max_depth, num_nodes = 0, 1
|
||||
conf, df = read_json(cfile), read_csv(dfile)
|
||||
# simtype = conf["stream_settings"]["path"].split("/")[1].split("_")[0]
|
||||
simtype = conf["stream_settings"]["path"].split("_")[0].strip()
|
||||
simtype = conf["stream_settings"]["path"].split("/")[1].split("_")[0]
|
||||
# simtype = conf["stream_settings"]["path"].split("_")[0].strip()
|
||||
view2fin = compute_view_finalisation_times(df, conf, oprefix, simtype, tag, plot=False)
|
||||
print(f'SIM:{simtype}', view2fin)
|
||||
if not view2fin: # < 2 views
|
||||
continue
|
||||
if simtype == "tree":
|
||||
num_nodes = conf["node_count"]
|
||||
max_depth = math.ceil(math.log(conf["overlay_settings"]["number_of_committees"], 2))
|
||||
#ceil((lg(N+1) - 1))
|
||||
max_depth = math.ceil(math.log(conf["overlay_settings"]["number_of_committees"]+1, 2)-1)
|
||||
else:
|
||||
num_tree_nodes = 2 ** (conf["overlay_settings"]["branch_depth"]) - 1
|
||||
num_committees = int (conf["node_count"]/conf["overlay_settings"]["branch_depth"])
|
||||
|
|
Loading…
Reference in New Issue