diff --git a/scripts/Makefile b/scripts/Makefile index 86ae5f4..97fd9ff 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,16 +1,8 @@ SHELL := /bin/bash -.SILENT: test -test: - echo "run,conf,latency" - . parse_lib.sh && \ - get_xp tor_bw_small | while read r; do \ - for i in 0 1 2 3; do \ - extract_us $$r $$i | while read l; do \ - echo $$r,$$i,$$l;\ - done; \ - done; \ - done; +tor_bw_small_parse: + @. parse_lib.sh && \ + parse_latency tor_bw_small 3 tor_bw_small: ./run-3 \ diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh index c99a314..9002b1d 100644 --- a/scripts/parse_lib.sh +++ b/scripts/parse_lib.sh @@ -5,3 +5,14 @@ get_xp() { 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 + extract_us $r $i | while read l; do + echo $r,$i,$l; + done + done + done +}