Improve code

This commit is contained in:
Quentin 2019-09-05 14:54:54 +02:00
parent 5f4f7be4f0
commit a317deccae
2 changed files with 14 additions and 11 deletions

View file

@ -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 \

View file

@ -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
}