From ae1afef215a62c9f505809c43cb74cc353a38516 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 5 Sep 2019 14:45:28 +0200 Subject: [PATCH] WIP parsing --- scripts/Makefile | 10 ++++++++++ scripts/parse_lib.sh | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 scripts/parse_lib.sh diff --git a/scripts/Makefile b/scripts/Makefile index bfe9d86..51c1af3 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -1,3 +1,13 @@ +SHELL := /bin/bash + +test: + . parse_lib.sh && \ + get_xp tor_bw_small | while read r; do \ + for i in 0 1 2 3; do \ + extract_us $$r $$i; \ + done; \ + done; + tor_bw_small: ./run-3 \ 1,tor_bw_small . \ diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh new file mode 100644 index 0000000..c99a314 --- /dev/null +++ b/scripts/parse_lib.sh @@ -0,0 +1,7 @@ +get_xp() { + grep -rn "identifier=$1" ./out/*/info.txt|grep -Po "^./out/\w+"|grep -Po '\w+$$'|uniq +} + +extract_us() { + grep -Po '\d+µs' ./out/$1-$2/res/*.csv | grep -Po '\d+' +}