Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions py-scripts/lf_interop_speedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,10 +1386,10 @@ def generate_report(self, result_dir_name, do_webgui=False, per_post_timeout=120
_results_dir_name=result_dir_name,
_path=self.result_dir if self.result_dir is not None else "/home/lanforge/html-reports"
)
report_path = report.get_path()
# report_path = report.get_path()
report_path_date_time = report.get_path_date_time()
os.makedirs(report_path, exist_ok=True)
os.makedirs(report_path_date_time, exist_ok=True)
# os.makedirs(report_path, exist_ok=True)
# os.makedirs(report_path_date_time, exist_ok=True)

all_ips = set()
for iter_data in self.iteration_dict.values():
Expand Down Expand Up @@ -1535,10 +1535,10 @@ def wait_for_iteration_posts(iter_idx, expected, timeout_s=per_post_timeout, sle
# store clean iteration data
per_iter[iter_idx] = {
"hostnames": host_list,
"download": dls,
"upload": uls,
"download_lat": dlat,
"upload_lat": ulat,
"download": [round(x, 2) for x in dls],
"upload": [round(x, 2) for x in uls],
"download_lat": [round(x, 2) for x in dlat],
"upload_lat": [round(x, 2) for x in ulat],
"meta": meta
}
print('DEBUG', per_iter)
Expand Down Expand Up @@ -1566,10 +1566,10 @@ def wait_for_iteration_posts(iter_idx, expected, timeout_s=per_post_timeout, sle

# aggregate averages per iteration
rotation_summary[rotation]["coords"].append(coord)
rotation_summary[rotation]["download"].append(sum(dls) / len(dls))
rotation_summary[rotation]["upload"].append(sum(uls) / len(uls))
rotation_summary[rotation]["download_lat"].append(sum(dlat) / len(dlat))
rotation_summary[rotation]["upload_lat"].append(sum(ulat) / len(ulat))
rotation_summary[rotation]["download"].append(round(sum(dls) / len(dls), 2))
rotation_summary[rotation]["upload"].append(round(sum(uls) / len(uls), 2))
rotation_summary[rotation]["download_lat"].append(round(sum(dlat) / len(dlat), 2))
rotation_summary[rotation]["upload_lat"].append(round(sum(ulat) / len(ulat), 2))

if self.robot_test:
# TODO NEED to add heading of rotation
Expand Down Expand Up @@ -1702,10 +1702,10 @@ def wait_for_iteration_posts(iter_idx, expected, timeout_s=per_post_timeout, sle
if ip in ip_to_idx:
j = ip_to_idx[ip]
hostnames.append(host or ip)
dls.append(iter_block['download_speed'][j])
uls.append(iter_block['upload_speed'][j])
dlat.append(iter_block['download_lat'][j])
ulat.append(iter_block['upload_lat'][j])
dls.append(round(iter_block['download_speed'][j], 2))
uls.append(round(iter_block['upload_speed'][j], 2))
dlat.append(round(iter_block['download_lat'][j], 2))
ulat.append(round(iter_block['upload_lat'][j], 2))
else:
host_label = host or ip or "(unknown)"
hostnames.append(host_label)
Expand Down Expand Up @@ -1741,9 +1741,13 @@ def wait_for_iteration_posts(iter_idx, expected, timeout_s=per_post_timeout, sle
_xticks_rotation=30,
_enable_csv=True
)
report.set_graph_image(graph.build_bar_graph())
report.move_graph_image()
report.build_graph()
png = graph.build_bar_graph()
if png:
report.set_graph_image(png)
report.move_graph_image()
report.build_graph()
report.set_csv_filename(png)
report.move_csv_file()

report.set_table_title('Per-Client Latency (Download & Upload)')
report.build_table_title()
Expand All @@ -1763,9 +1767,13 @@ def wait_for_iteration_posts(iter_idx, expected, timeout_s=per_post_timeout, sle
_xticks_rotation=30,
_enable_csv=True
)
report.set_graph_image(graph2.build_bar_graph())
report.move_graph_image()
report.build_graph()
png2 = graph2.build_bar_graph()
if png2:
report.set_graph_image(png2)
report.move_graph_image()
report.build_graph()
report.set_csv_filename(png2)
report.move_csv_file()

test_input_info = {
# "IP": [dev["ip"] for dev in roster], # Uncomment for IP column
Expand Down Expand Up @@ -1921,7 +1929,7 @@ def main():
optional.add_argument(
'--result_dir',
type=str,
default='results',
default='',
help='Directory to store test results')

optional.add_argument(
Expand Down