From 61675ef4edbde3108de08362d63252b83196c07e Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Mon, 16 Sep 2019 08:54:22 +0200 Subject: [PATCH] Add parse bandwidth --- r/thunder_configure.R | 2 +- scripts/Makefile | 4 ++++ scripts/parse_lib.sh | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/r/thunder_configure.R b/r/thunder_configure.R index 001b869..2bbdcc4 100644 --- a/r/thunder_configure.R +++ b/r/thunder_configure.R @@ -3,7 +3,7 @@ library(sqldf) library(plyr) library(cowplot) -thunder_ms <- read.csv("thunder_configure_4_ms.csv") +thunder_ms <- read.csv("thunder_configure_6.csv") thunder_ms <- sqldf("select run,jmax,links,latency, CAST(latency as real) / 1000. as lat_ms from thunder_ms") thunder_ms$links <- as.factor(thunder_ms$links) diff --git a/scripts/Makefile b/scripts/Makefile index be37ef8..9036166 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -348,6 +348,10 @@ thunder_configure_2_full_parse: @. parse_lib.sh && \ parse_thunder thunder_configure_2 27 +thunder_configure_2_full_parse_bw: + @. parse_lib.sh && \ + parse_thunder_bw thunder_configure_2 27 + tor_just_many_latencies: ./run-3 \ 16,tor_just_many_latencies . \ diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh index f6949f1..da5710e 100644 --- a/scripts/parse_lib.sh +++ b/scripts/parse_lib.sh @@ -33,3 +33,19 @@ parse_thunder() { done done } + +parse_thunder_bw() { + echo "run,jmax,links,udp_sent,udp_rcv,cells_sent,cells_rcv" + 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+$") + udp_sent=$(grep -Po "udp_sent: \d+" out/$r-$i/log/client-donar-stdout.log|grep -Po "\d+$") + udp_rcv=$(grep -Po "udp_rcv: \d+" out/$r-$i/log/client-donar-stdout.log|grep -Po "\d+$") + cells_sent=$(grep -Po "cells_sent: \d+" out/$r-$i/log/client-donar-stdout.log|grep -Po "\d+$") + cells_rcv=$(grep -Po "cells_rcv: \d+" out/$r-$i/log/client-donar-stdout.log|grep -Po "\d+$") + [ -n "$udp_sent" ] && [ -n "$udp_rcv" ] && [ -n "$cells_sent" ] && [ -n "$cells_rcv" ] && \ + echo "$r,$jmax,$links,$udp_sent,$udp_rcv,$cells_sent,$cells_rcv" + done + done +}