Able to parse command line
This commit is contained in:
parent
a52a4c8146
commit
a80b950219
5 changed files with 31 additions and 21 deletions
|
@ -3,8 +3,7 @@ library(sqldf)
|
|||
library(plyr)
|
||||
library(cowplot)
|
||||
|
||||
thunder_ms <- read.csv("thunder_configure_21.csv")
|
||||
|
||||
thunder_ms <- read.csv("thunder_configure_100ms.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)
|
||||
|
@ -16,35 +15,30 @@ v1 <- ggplot(data = thunder_ms, aes(x = jmax, y=lat_ms, fill=links)) +
|
|||
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)) +
|
||||
coord_cartesian(xlim = c(1, 7), ylim = c(0, 1000)) +
|
||||
#ylim(0,1000) +
|
||||
scale_fill_grey() +
|
||||
scale_y_log10() +
|
||||
#scale_y_log10() +
|
||||
ylab("latency (ms)") +
|
||||
xlab("max allowed jitter") +
|
||||
theme_classic()
|
||||
|
||||
#v1 + ggsave("thunder_configure_ms.png", dpi=300, dev='png', height=5, width=15, units="cm")
|
||||
|
||||
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 <- sqldf("select run,jmax,links,(3000-COUNT(latency)*1.0)/3000 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(outlier.size=0.1) +
|
||||
geom_violin(scale='width') +
|
||||
geom_boxplot(outlier.size=0.1) +
|
||||
#geom_violin(scale='width') +
|
||||
scale_y_continuous(labels = scales::percent) +
|
||||
scale_fill_grey() +
|
||||
coord_cartesian(ylim = c(0,0.2)) +
|
||||
#scale_y_log10(labels = scales::percent) +
|
||||
ylab("dropped packets") +
|
||||
xlab("max allowed jitter") +
|
||||
theme_classic()
|
||||
|
||||
<<<<<<< HEAD
|
||||
thunder_bw <- read.csv("thunder_configure_21_bw.csv")
|
||||
=======
|
||||
thunder_bw <- read.csv("thunder_configure_20_bw.csv")
|
||||
>>>>>>> 1bd4c2aa8469d54046c78999147c638b22ea6f75
|
||||
thunder_bw <- read.csv("thunder_configure_100ms_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)
|
||||
|
@ -62,7 +56,7 @@ v3 <- ggplot(data = thunder_bw, aes(x = jmax, y=sent_ratio, fill=links)) +
|
|||
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")
|
||||
|
||||
thunder_links <- read.csv("thunder_configure_partial_links.csv")
|
||||
thunder_links <- read.csv("thunder_configure_20_links.csv")
|
||||
links_down_at_least_once <- sqldf("select run,xp_time,link_id, COUNT(status) as downcount, SUM(delta) as elapsed from thunder_links where status='down' group by run,link_id,xp_time")
|
||||
links_down_at_least_once2 <- sqldf("select row_number () OVER (PARTITION BY run ORDER BY elapsed DESC) sorting,run,link_id,downcount,elapsed,xp_time,1.0*elapsed/xp_time down_ratio from links_down_at_least_once")
|
||||
links_down_at_least_once2$sorting <- as.factor(links_down_at_least_once2$sorting)
|
||||
|
@ -268,10 +262,7 @@ library(purrr)
|
|||
library(tidyr)
|
||||
|
||||
tor_lat_stack <- tor_multi_lat %>%
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
dplyr::mutate(latency = latency / 1000) %>%
|
||||
>>>>>>> 1bd4c2aa8469d54046c78999147c638b22ea6f75
|
||||
dplyr::group_by(run,conf) %>%
|
||||
dplyr::summarise(
|
||||
id = paste(first(run),first(conf)),
|
||||
|
|
|
@ -438,7 +438,7 @@ thunder_configure_2_full_parse_bw:
|
|||
|
||||
thunder_configure_2_full_parse_links:
|
||||
@. parse_lib.sh && \
|
||||
parse_thunder_links thunder_configure_2 41
|
||||
parse_thunder_links thunder_configure_2 41 ${base_name}
|
||||
|
||||
thunder_configure_2_full_parse_drop:
|
||||
@. parse_lib.sh && \
|
||||
|
|
|
@ -51,11 +51,20 @@ parse_thunder_bw() {
|
|||
}
|
||||
|
||||
parse_thunder_links() {
|
||||
echo "run,ts,link_id,status,delta,duration,will_change,xp_time,durations_global,will_change_global"
|
||||
base_name=$3
|
||||
inited=""
|
||||
|
||||
get_xp $1 | while read r; do
|
||||
for i in $(seq 0 1 $2); do
|
||||
grep -q 'thunder-client 9900 30 100 12 250' out/$r-$i/info.txt && cat out/$r-$i/log/client-donar-stdout.log | ./links_parse.py $r-$i || true
|
||||
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+$")
|
||||
output="${base_name}_${links}_${jmax}.csv"
|
||||
|
||||
[ -n "$inited" ] \
|
||||
|| echo "run,links,jmax,ts,link_id,status,delta,duration,will_change,xp_time,durations_global,will_change_global" > $output
|
||||
cat out/$r-$i/log/client-donar-stdout.log | ./links_parse.py "$r-$i,$links,$jmax" >> $output || true
|
||||
done
|
||||
inited="done"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -473,9 +473,18 @@ void algo_thunder_init(struct evt_core_ctx* ctx, struct algo_ctx* app_ctx, struc
|
|||
thunderc->monit_pkt_size = sizeof(links.fmt.headers) + sizeof(links.fmt.content.link_monitoring_thunder) + sizeof(struct link_info) * (thunderc->total_links - 1);
|
||||
|
||||
if (ap->algo_specific_params != NULL) {
|
||||
sscanf(ap->algo_specific_params, "%ld", &thunderc->allowed_jitter_ms);
|
||||
char *parse_ptr, *token, *params;
|
||||
|
||||
for (params = ap->algo_specific_params ; ; params = NULL) {
|
||||
token = strtok_r(params, ",", &parse_ptr);
|
||||
if (token == NULL) break;
|
||||
sscanf(token, "jitter=%ld", &thunderc->allowed_jitter_ms);
|
||||
sscanf(token, "scheduler=%d", &thunderc->scheduler_activated);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Allowed jitter set to %ld ms\n", thunderc->allowed_jitter_ms);
|
||||
printf("Scheduler is %s\n", thunderc->scheduler_activated ? "activated" : "deactivated");
|
||||
|
||||
init_timer(ctx);
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ struct thunder_ctx {
|
|||
int64_t estimated_sent[MAX_LINKS];
|
||||
size_t monit_pkt_size;
|
||||
int64_t allowed_jitter_ms;
|
||||
int scheduler_activated;
|
||||
struct timespec prev_link_time, prev_rcv_link_time, start_time;
|
||||
};
|
||||
void get_estimation(struct thunder_ctx* thunderc, int64_t* sorted_estimation, uint64_t* sorted_occurencies);
|
||||
|
|
Loading…
Reference in a new issue