diff --git a/scripts/Makefile b/scripts/Makefile index 36791d7..1d535c3 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -356,6 +356,18 @@ thunder_configure_2_full_parse_links: @. parse_lib.sh && \ parse_thunder_links thunder_configure_2 27 +thunder_configure_2_full_parse_drop: + @. parse_lib.sh && \ + parse_thunder_drop thunder_configure_2 27 + +thunder_configure_2_full_parse_drop_burst: + @. parse_lib.sh && \ + parse_thunder_drop_burst thunder_configure_2 27 + +thunder_configure_2_full_parse_red: + @. parse_lib.sh && \ + parse_thunder_red thunder_configure_2 27 + tor_just_many_latencies: ./run-3 \ 16,tor_just_many_latencies . \ diff --git a/scripts/drop_burst_parse.py b/scripts/drop_burst_parse.py index e69fad9..adfcc94 100755 --- a/scripts/drop_burst_parse.py +++ b/scripts/drop_burst_parse.py @@ -2,6 +2,7 @@ import sys,re,math +run = sys.argv[1] prev = 0 for line in sys.stdin: @@ -11,5 +12,5 @@ for line in sys.stdin: pkt_id = int(pkt_id) - 1 dropped = pkt_id - (prev+1) if dropped > 0: - print(f"{prev},{pkt_id},{dropped}") + print(f"{run},{prev},{pkt_id},{dropped}") prev = pkt_id diff --git a/scripts/drop_parse.py b/scripts/drop_parse.py index 6399d80..cf49b13 100755 --- a/scripts/drop_parse.py +++ b/scripts/drop_parse.py @@ -4,6 +4,7 @@ import sys,re,math group_by = int(sys.argv[1]) total = int(sys.argv[2]) +run = sys.argv[3] prev = 0 bins = [0] * (total // group_by) @@ -13,8 +14,10 @@ for line in sys.stdin: pkt_id, = res.groups() pkt_id = int(pkt_id) - 1 for missing in range(prev+1,pkt_id): - bins[missing // group_by] += 1 + idx = missing // group_by + if idx >= len(bins): continue + bins[idx] += 1 prev = pkt_id for i in range(len(bins)): - print(f"{i*group_by}-{(i+1)*group_by-1},{bins[i]}") + print(f"{run},{i*group_by}-{(i+1)*group_by-1},{bins[i]}") diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh index 2d39fc5..eea8df8 100644 --- a/scripts/parse_lib.sh +++ b/scripts/parse_lib.sh @@ -60,11 +60,21 @@ parse_thunder_links() { } parse_thunder_drop() { - echo "b" + echo "run,packet_range,count" + get_xp $1 | while read r; do + for i in $(seq 0 1 $2); do + cat out/$r-$i/res/thunder.csv | ./drop_parse.py 990 9900 $r-$i || true + done + done } parse_thunder_drop_burst() { - echo "a" + echo "run,prev,cur,count" + get_xp $1 | while read r; do + for i in $(seq 0 1 $2); do + cat out/$r-$i/log/client-donar-stdout.log | ./drop_burst_parse.py $r-$i || true + done + done } parse_thunder_red() {