diff --git a/r/thunder_configure.R b/r/thunder_configure.R index 7ecd26d..668208a 100644 --- a/r/thunder_configure.R +++ b/r/thunder_configure.R @@ -3,11 +3,26 @@ library(sqldf) library(plyr) library(cowplot) -thunder_ms <- read.csv("thunder_configure_100ms.csv") +thunder_ms <- read.csv("thunder_23.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) thunder_ms$jmax <- as.factor(thunder_ms$jmax) +ggplot(data = thunder_ms, aes(x = links, y=lat_ms)) + + #geom_violin() + + geom_boxplot(outlier.size=0.1) + + geom_hline(yintercept=800, color = "red", linetype="dashed") + + geom_hline(yintercept=400, color = "DarkGreen") + + annotate("text", x=7.1, y=650, label= "high", color="DarkGreen") + + annotate("text", x=7, y=1200, label= "acceptable", color="red") + + coord_cartesian(xlim = c(1, 7), ylim = c(0, 1000)) + + #ylim(0,1000) + + scale_fill_grey() + + #scale_y_log10() + + ylab("latency (ms)") + + xlab("links") + + theme_classic() + v1 <- ggplot(data = thunder_ms, aes(x = jmax, y=lat_ms, fill=links)) + #geom_violin() + geom_boxplot(outlier.size=0.1) + @@ -25,7 +40,7 @@ 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,(3000-COUNT(latency)*1.0)/3000 as dlv from thunder_ms group by jmax,links,run") +thunder_rcv <- sqldf("select run,jmax,links,(9900-COUNT(latency)*1.0)/9900 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)) + @@ -38,7 +53,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_100ms_bw.csv") +thunder_bw <- read.csv("thunder_22_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) diff --git a/src/meas_lat.c b/src/meas_lat.c index 1c14afa..43f9c13 100644 --- a/src/meas_lat.c +++ b/src/meas_lat.c @@ -78,7 +78,7 @@ int on_udp(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { micro_sec = elapsed_micros (&head->emit_time, &curr); printf("[%s] Packet %llu latency %luµs\n", ctime_no_newline, (unsigned long long)head->counter, micro_sec); - if (head->counter >= mc->max_measure) { + if (mc->max_measure > 0 && head->counter >= mc->max_measure) { printf("Measurement done\n"); exit(EXIT_SUCCESS); }