Skip to content
Snippets Groups Projects
Commit c40e1294 authored by Filip Johnsson's avatar Filip Johnsson
Browse files

Update analyze script to handle multiple tests

parent f8ac14e7
No related branches found
No related tags found
No related merge requests found
...@@ -58,13 +58,16 @@ def main(): ...@@ -58,13 +58,16 @@ def main():
for rate in rates: for rate in rates:
algs = os.listdir(f"{results}/{delay}/{buffer}/{rate}") algs = os.listdir(f"{results}/{delay}/{buffer}/{rate}")
bit_rates = {} bit_rates = dict(bbr=0, cubic=0)
count = 0
# For each file in ./results/delay_x/buffer_x/max_rate_x/ # For each file in ./results/delay_x/buffer_x/max_rate_x/
for alg in algs: for alg_id in algs:
bit_rates[alg] = get_bitrate(f"{results}/{delay}/{buffer}/{rate}/{alg}") count += 1/2
alg_name = alg_id.split('_')[0]
bit_rates[alg_name] += get_bitrate(f"{results}/{delay}/{buffer}/{rate}/{alg_id}")
diff = round(bit_rates["bbr_0.txt"] - bit_rates["cubic_0.txt"], 6) diff = round((bit_rates["bbr"] - bit_rates["cubic"]) / count, 6)
diff_str = str(diff) diff_str = str(diff)
if not diff_str.startswith('-'): diff_str = '+' + diff_str # Add '+' if positive if not diff_str.startswith('-'): diff_str = '+' + diff_str # Add '+' if positive
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment