From 2b7342a21db9ddebce21b969bb30353b9002f2bf Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 6 May 2019 16:07:38 +0200 Subject: [PATCH] Update generate csv and run-seq --- scripts/generate_csv | 108 ++++++++++++++++++++++++++++++++++++++----- scripts/run-seq | 3 +- 2 files changed, 98 insertions(+), 13 deletions(-) diff --git a/scripts/generate_csv b/scripts/generate_csv index 1445220..b649de8 100755 --- a/scripts/generate_csv +++ b/scripts/generate_csv @@ -1,29 +1,112 @@ #!/bin/bash -echo "orig latencies global" +cat < witness_latencies_global.csv +echo "latencies distri" +{ echo "hs,type,delta";ls|grep '^witness-'|while read -r line; do cat $line/res/witness.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > witness_latencies_distri.csv + +cat < orig_latencies_global.csv -echo "orig latencies distri" +echo "latencies distri" { echo "hs,type,delta";ls|grep '^orig-'|while read -r line; do cat $line/res/orig.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > orig_latencies_distri.csv -echo "naive latencies global" +cat < naive_latencies_global.csv -echo "naive latencies distri" +echo "latencies distri" { echo "hs,type,delta";ls|grep '^naive-'|while read -r line; do cat $line/res/naive.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > naive_latencies_distri.csv -echo "rr latencies global" +cat < rr_latencies_global.csv -echo "rr latencies distri" +echo "latencies distri" { echo "hs,type,delta";ls|grep '^rr-'|while read -r line; do cat $line/res/rr.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > rr_latencies_distri.csv { echo 'run,rcv' ; ls|grep '^rr-'|while read -r line; do echo -n "$line,"; cat $line/res/rr.csv|grep -Po "\d*µs"|grep -Po "\d*"|wc -l; done } > rr_lost.csv { echo "run,pkt_id"; ls|grep '^rr-'|while read line; do comm -23 <(seq 1 6000|sort) <(grep -Po 'Packet \d*' $line/res/rr.csv | grep -Po '\d*'|sort) | sort -n | while read e; do echo "$line,$e"; done; done } > rr_missed.csv -echo "rrh latencies global" -{ echo "delta" ; ls|grep '^rrh-'|while read -r line; do cat $line/res/rrh.csv|grep -Po "\d*µs"|grep -Po "\d*"; done } > rrh_latencies_global.csv -echo "rrh latencies distri" -{ echo "hs,type,delta";ls|grep '^rrh-'|while read -r line; do cat $line/res/rrh.csv|grep -Po "\d*µs"|grep -Po "\d*"|python3 ./format-data.py $line; done } > rrh_latencies_distri.csv -{ echo 'run,rcv' ; ls|grep '^rrh-'|while read -r line; do echo -n "$line,"; cat $line/res/rrh.csv|grep -Po "\d*µs"|grep -Po "\d*"|wc -l; done } > rrh_lost.csv -{ echo "run,dead_links"; ls|grep '^rrh-'|while read line; do echo -n "$line,"; grep -Po 'Blacklist link=\d' $line/log/server-donar-stdout.log | sort | uniq -c | wc -l; done } > rrh_blacklisted.csv +cat < rrh_latencies_global.csv + +echo "latencies distri" +{ + echo "hs,type,delta"; + ls \ + | grep '^rrh-' \ + | while read -r line; do + cat $line/res/rrh.csv \ + | grep -Po "\d*µs" \ + | grep -Po "\d*" \ + | python3 ./format-data.py $line; + done +} > rrh_latencies_distri.csv + +echo "packet losts" +{ + echo 'run,rcv' ; + ls \ + | grep '^rrh-' \ + | while read -r line; do + echo -n "$line,"; + cat $line/res/rrh.csv \ + | grep -Po "\d*µs" \ + | grep -Po "\d*" \ + | wc -l; + done +} > rrh_lost.csv + +echo "blacklisted" +{ + echo "run,dead_links"; + ls \ + | grep '^rrh-' \ + | while read line; do + echo -n "$line,"; + grep -Po 'Blacklist link=\d' $line/log/server-donar-stdout.log \ + | sort \ + | uniq -c \ + | wc -l; + done +} > rrh_blacklisted.csv + +echo "missed" { echo "run,pkt_id"; ls \ @@ -42,6 +125,7 @@ echo "rrh latencies distri" done } > rrh_missed.csv +echo "flip blacklist" { echo 'run,role,pos,count' ; ls \ diff --git a/scripts/run-seq b/scripts/run-seq index 65050dd..9922a8c 100755 --- a/scripts/run-seq +++ b/scripts/run-seq @@ -1,8 +1,9 @@ #!/bin/bash +COUNT=$1 WAITFOR=1800 # 30min -for i in {1..60}; do +for i in {1..$COUNT}; do timeout $WAITFOR bash <