Fix parse lib

This commit is contained in:
Quentin 2019-09-17 11:22:58 +02:00
parent a85aec85e5
commit b512cbfdb9

View file

@ -7,7 +7,7 @@ is_measurement_done() {
} }
extract_us() { extract_us() {
cat ./out/$1-$2/res/*.csv | grep -P "Packet (\d+) latency (\d+)" | perl -i -pe's/^.*Packet (\d+) latency (\d+).*$/$2,$1/' cat ./out/$1-$2/res/*.csv | grep -P "Packet (\d+) latency (\d+)" | perl -pe's/^.*Packet (\d+) latency (\d+).*$/$2,$1/'
} }
parse_latency() { parse_latency() {
@ -72,7 +72,7 @@ parse_thunder_drop_burst() {
echo "run,prev,cur,count" echo "run,prev,cur,count"
get_xp $1 | while read r; do get_xp $1 | while read r; do
for i in $(seq 0 1 $2); 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 cat out/$r-$i/res/thunder.csv | ./drop_burst_parse.py $r-$i || true
done done
done done
} }
@ -81,7 +81,7 @@ parse_thunder_red() {
echo "run,delivered_at_once,occur" echo "run,delivered_at_once,occur"
get_xp $1 | while read r; do get_xp $1 | while read r; do
for i in $(seq 0 1 $2); do for i in $(seq 0 1 $2); do
grep -Po "Delivered \d+ packets" out/$r-$i/log/client-donar-stdout.log | grep -Po "\d+"|sort|uniq -c|perl -i -pe"s/^\s*(\d+)\s+(\d+)$/$r-$i,\$2,\$1/" grep -Po "Delivered \d+ packets" out/$r-$i/log/client-donar-stdout.log | grep -Po "\d+"|sort|uniq -c|perl -pe"s/^\s*(\d+)\s+(\d+)$/$r-$i,\$2,\$1/"
done done
done done
} }