Fix hardcoded value

This commit is contained in:
Quentin 2019-09-17 16:44:49 +02:00
parent 5b1c0c077b
commit 852309a771
2 changed files with 9 additions and 6 deletions

View file

@ -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")

View file

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