From ac8274d3c62e482cc75433da00b05ee35151a310 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 17 Sep 2019 01:30:43 +0200 Subject: [PATCH] Parse in a clever way ;) --- r/thunder_configure.R | 9 +++++++++ scripts/parse_lib.sh | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/r/thunder_configure.R b/r/thunder_configure.R index a639999..c4e3110 100644 --- a/r/thunder_configure.R +++ b/r/thunder_configure.R @@ -127,5 +127,14 @@ v7 <- ggplot(data = downtime_group, aes(x=down_link_count, y=dur)) + t2 <- plot_grid(v4, v5, v6, v7, labels = c('A', 'B', 'C', 'D'), ncol=2) t2 + ggsave("thunder_links.png", dpi=300, dev='png', height=12, width=15, units="cm") +latency_evol <- sqldf( +" +select sorting,lat_ms +from + thunder_ms as tm, + (select run,jmax,links,row_number () OVER (ORDER BY run,jmax,links DESC) sorting from thunder_ms group by run,jmax,links ORDER BY links DESC limit 0,3) as sel_run +where + tm.run = sel_run.run and tm.jmax = sel_run.jmax and tm.links = sel_run.links +") diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh index 6c848b1..071d233 100644 --- a/scripts/parse_lib.sh +++ b/scripts/parse_lib.sh @@ -7,7 +7,7 @@ is_measurement_done() { } extract_us() { - grep -Po '\d+µs' ./out/$1-$2/res/*.csv | grep -Po '\d+' + cat ./out/$1-$2/res/*.csv | perl -i -pe's/^.*Packet (\d+) latency (\d+).*$/$2,$1/' } parse_latency() { @@ -22,7 +22,7 @@ parse_latency() { } parse_thunder() { - echo "run,jmax,links,latency" + echo "run,jmax,links,latency,ident" 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+$")