From 852309a771ef43f905eed7d085a8bb2869d6579d Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 17 Sep 2019 16:44:49 +0200 Subject: [PATCH] Fix hardcoded value --- r/thunder_configure.R | 13 ++++++++----- src/proxy.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/r/thunder_configure.R b/r/thunder_configure.R index 33b649c..e764d9a 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_17.csv") +thunder_ms <- read.csv("thunder_configure_18.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) @@ -144,7 +144,8 @@ where latency_evol$sorting <- as.factor(latency_evol$sorting) v8 <- ggplot(data=latency_evol, aes(x=ident,y=lat_ms)) + geom_line() + - xlab("Call duration") + + xlab("Packet identifier") + + ylab("Latency (ms)") + theme_classic() thunder_drop <- read.csv("thunder_configure_16_drop.csv") @@ -164,10 +165,11 @@ v9 <- ggplot(data = thunder_drop_2, aes(x=packet_range, y=packet_ratio,fill=sort #scale_y_log10() + scale_y_continuous(labels = scales::percent) + ylab("Packets dropped") + - xlab("Call duration") + + xlab("Packet identifier") + + labs(fill="Run") + scale_fill_grey() + - theme_classic() - + theme_classic() + + theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.key.size = unit(0.2, "cm")) thunder_drop_burst <- read.csv("thunder_configure_16_drop_burst.csv") tdb_ag <- sqldf("select run,count,COUNT(count) as oc from thunder_drop_burst where run LIKE '%-24' group by run,count") @@ -231,3 +233,4 @@ v11 <- ggplot(data = tred, aes(x=delivered_at_once, y=occur_ratio)) + theme_classic() 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") diff --git a/src/proxy.c b/src/proxy.c index b93d93e..818fb80 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -195,7 +195,7 @@ void algo_main_init(struct evt_core_ctx* evt, struct algo_params* ap) { struct algo_ctx* ctx = malloc(sizeof(struct algo_ctx)); if (ctx == NULL) goto init_err; memset(ctx, 0, sizeof(struct algo_ctx)); - ctx->link_count = 8; + ctx->link_count = ap->links; ctx->is_rdy = 0; ctx->ap = *ap;