This commit is contained in:
Quentin Dufour 2019-09-16 08:34:28 +00:00
commit 2ea6e46dba
4 changed files with 53 additions and 4 deletions

View file

@ -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_7.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)
@ -12,7 +12,7 @@ thunder_ms$jmax <- as.factor(thunder_ms$jmax)
v1 <- ggplot(data = thunder_ms, aes(x = jmax, y=lat_ms, fill=links)) +
geom_boxplot() +
scale_fill_grey() +
ylim(0,1000) +
scale_y_log10() +
ylab("latency (ms)") +
xlab("max allowed jitter") +
theme_classic()
@ -20,3 +20,30 @@ v1 <- ggplot(data = thunder_ms, aes(x = jmax, y=lat_ms, fill=links)) +
v1 + ggsave("thunder_configure_ms.png", dpi=300, dev='png', height=5, width=15, units="cm")
thunder_rcv <- sqldf("select run,jmax,links,(6000-COUNT(latency)*1.0)/6000 as dlv from thunder_ms group by jmax,links,run")
thunder_rcv$jmax <- as.factor(thunder_rcv$jmax)
thunder_rcv$links <- as.factor(thunder_rcv$links)
v2 <- ggplot(data = thunder_rcv, aes(x = jmax, y=dlv, fill=links)) +
geom_boxplot() +
scale_y_continuous(labels = scales::percent) +
scale_fill_grey() +
ylab("dropped packets") +
xlab("max allowed jitter") +
theme_classic()
thunder_bw <- read.csv("thunder_configure_7_bw.csv")
thunder_bw <- sqldf("select run,jmax,links,udp_sent,udp_rcv,cells_sent,cells_rcv,1.0*cells_sent/udp_sent as sent_ratio,1.0*cells_rcv/udp_rcv as rcv_ratio from thunder_bw where udp_sent > 4000")
thunder_bw$jmax <- as.factor(thunder_bw$jmax)
thunder_bw$links <- as.factor(thunder_bw$links)
v3 <- ggplot(data = thunder_bw, aes(x = jmax, y=sent_ratio, fill=links)) +
geom_boxplot() +
scale_y_log10() +
#scale_y_log10(labels = scales::percent) +
scale_fill_grey() +
ylab("bandwidth ratio") +
xlab("max allowed jitter") +
theme_classic()
t1 <- plot_grid(v1, v2, v3, labels = c('A', 'B', 'C'), ncol=1)
t1 + ggsave("thunder_configure.png", dpi=300, dev='png', height=15, width=15, units="cm")

View file

@ -6,8 +6,10 @@ library(cowplot)
cellssec <- c("1","2","10","20")
tor_bw <- read.csv("tor_bw_2.csv")
tor_bw <- sqldf("select run,conf,latency, CAST(latency as real) / 1000. as lat_ms from tor_bw")
tor_bw$conf <- as.factor(tor_bw$conf)
tor_bw$conf <- factor(
mapvalues(tor_bw$conf, c(0,1,2,3), cellssec),
levels = cellssec,
ordered = TRUE)
gbw1 <- ggplot(data = tor_bw, aes(x = conf, y=lat_ms)) +
geom_boxplot() +
ylim(0,1000) +

View file

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

View file

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