35 lines
891 B
Bash
35 lines
891 B
Bash
get_xp() {
|
|
grep -rn "identifier=$1" ./out/*/info.txt|grep -Po "^./out/\w+"|grep -Po '\w+$$'|uniq
|
|
}
|
|
|
|
is_measurement_done() {
|
|
grep -q 'Measurement done' ./out/$1-$2/res/*.csv
|
|
}
|
|
|
|
extract_us() {
|
|
grep -Po '\d+µs' ./out/$1-$2/res/*.csv | grep -Po '\d+'
|
|
}
|
|
|
|
parse_latency() {
|
|
echo "run,conf,latency"
|
|
get_xp $1 | while read r; do
|
|
for i in $(seq 0 1 $2); do
|
|
is_measurement_done $r $i && extract_us $r $i | while read l; do
|
|
echo $r,$i,$l;
|
|
done
|
|
done
|
|
done
|
|
}
|
|
|
|
parse_thunder() {
|
|
echo "run,jmax,links,latency"
|
|
get_xp $1 | while read r; do
|
|
for i in $(seq 0 1 $2); do
|
|
links=$(grep -Po "thunder-server \d+" out/$r-$i/info.txt|grep -Po "\d+$")
|
|
jmax=$(grep -Po "thunder-server \d+ \d+" out/$r-$i/info.txt|grep -Po "\d+$")
|
|
is_measurement_done $r $i && extract_us $r $i | while read l; do
|
|
echo $r,$jmax,$links,$l;
|
|
done
|
|
done
|
|
done
|
|
}
|