diff --git a/r/thunder_configure.R b/r/thunder_configure.R index e764d9a..37c7f25 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_18.csv") +thunder_ms <- read.csv("thunder_configure_19.csv") thunder_ms <- sqldf("select run,ident,jmax,links,latency, CAST(latency as real) / 1000. as lat_ms from thunder_ms") thunder_ms$links <- as.factor(thunder_ms$links) @@ -37,7 +37,7 @@ v2 <- ggplot(data = thunder_rcv, aes(x = jmax, y=dlv, fill=links)) + xlab("max allowed jitter") + theme_classic() -thunder_bw <- read.csv("thunder_configure_17_bw.csv") +thunder_bw <- read.csv("thunder_configure_19_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) @@ -234,3 +234,40 @@ v11 <- ggplot(data = tred, aes(x=delivered_at_once, y=occur_ratio)) + t3 <- plot_grid(v8, v9, v10, v11, labels = c('A', 'B', 'C', 'D'), ncol=2) t3 + ggsave("thunder_packets.png", dpi=300, dev='png', height=12, width=15, units="cm") + +tor_multi_lat <- read.csv("tor_just_many_latencies.csv") +tor_drop <- sqldf("select run,conf,1.0*MAX(ident)/33 as last_one from tor_multi_lat group by run,conf") +v12 <- ggplot(data=tor_drop,aes(x=last_one)) + + stat_ecdf(pad = FALSE) + + ylab("% broken links") + + coord_cartesian(xlim = c(0, 300), ylim = c(0,0.5)) + + scale_y_continuous(labels = scales::percent) + + xlab("Elapsed time (sec)") + + theme_classic() + +v12 + ggsave("broken.png", dpi=300, dev='png', height=5, width=15, units="cm") + +library(dplyr) +library(purrr) +library(tidyr) + +tor_lat_stack <- tor_multi_lat %>% + + dplyr::group_by(run,conf) %>% + dplyr::summarise( + id = paste(first(run),first(conf)), + min = min(latency), + max = max(latency), + max_sort = max(latency), + q25 = quantile(latency,0.25), + median = median(latency), + median_sort = median(latency), + q75 = quantile(latency,0.75), + q95 = quantile(latency,0.95), + q99 = quantile(latency,0.99) + ) + +tor_lat_stack <- gather(tor_lat_stack, 'min', 'max', 'q25', 'median', 'q75', 'q95', 'q99', key="quantile_name", value="quantile_value") +ggplot(tor_lat_stack, aes(x=id,y=quantile_value,fill=quantile_name)) + + ylim(0,1000000) + + geom_bar(stat="identity", position="dodge") diff --git a/scripts/Makefile b/scripts/Makefile index 39cc4cf..68e3130 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -402,11 +402,11 @@ thunder_configure_2_full: thunder_configure_2_full_parse: @. parse_lib.sh && \ - parse_thunder thunder_configure_2 27 + parse_thunder thunder_configure_2 41 thunder_configure_2_full_parse_bw: @. parse_lib.sh && \ - parse_thunder_bw thunder_configure_2 27 + parse_thunder_bw thunder_configure_2 41 thunder_configure_2_full_parse_links: @. parse_lib.sh && \ @@ -588,3 +588,6 @@ tor_just_many_latencies: tor3 -f /etc/torrc_simple, \ tor3 -f /etc/torrc_simple +tor_just_many_latencies_parse: + @. parse_lib.sh && \ + parse_latency tor_just_many_latencies 39 diff --git a/scripts/parse_lib.sh b/scripts/parse_lib.sh index 4c9b116..be644f0 100644 --- a/scripts/parse_lib.sh +++ b/scripts/parse_lib.sh @@ -11,10 +11,10 @@ extract_us() { } parse_latency() { - echo "run,conf,latency" + echo "run,conf,latency,ident" get_xp $1 | while read r; do for i in $(seq 0 1 $2); do - is_measurement_done $r $i && extract_us $r $i | while read l; do + extract_us $r $i | while read l; do echo $r,$i,$l; done done