Comment logs

This commit is contained in:
Quentin 2019-10-22 11:09:36 +02:00
parent 9234d9c1c0
commit 84161c91bb
2 changed files with 10 additions and 6 deletions

View file

@ -10,7 +10,7 @@ ggplot(data=link_info, aes(x=timestamp, y=link, color=speed)) +
theme_classic() theme_classic()
xx <- read.csv("../res/tmp_light/q.csv") xx <- read.csv("../../donar-res/tmp_light/ac.csv")
xx2 <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,way from xx group by packet_id,way") xx2 <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,way from xx group by packet_id,way")
ggplot(data=xx2, aes(x=packet_id, y=lat, color=way)) + ggplot(data=xx2, aes(x=packet_id, y=lat, color=way)) +
geom_line() + geom_line() +
@ -68,7 +68,7 @@ ggplot(data=xx3, aes(x=lat, group=flag, color=flag)) +
coord_cartesian(xlim=c(0,1200)) + coord_cartesian(xlim=c(0,1200)) +
theme_classic() theme_classic()
xy <- read.csv("../res/tmp_light/light.csv") xy <- read.csv("../../donar-res/tmp_light/aa.csv")
xz <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,way,conf,run from xy where packet_id > 50 and packet_id < 7400 group by packet_id,way,conf,run") xz <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,way,conf,run from xy where packet_id > 50 and packet_id < 7400 group by packet_id,way,conf,run")
xz$conf <- factor(xz$conf) xz$conf <- factor(xz$conf)
ggplot(data=xz, aes(x=lat, group=conf, color=conf)) + ggplot(data=xz, aes(x=lat, group=conf, color=conf)) +
@ -92,7 +92,7 @@ ggplot(data=sqldf("select * from xa where run='out/bhTF0rd7MOI5SOPs-6'"), aes(x=
#geom_point(aes(shape=conf)) + #geom_point(aes(shape=conf)) +
theme_classic() theme_classic()
xb <- read.csv("../res/tmp_light/v.csv") xb <- read.csv("../../donar-res/tmp_light/ac.csv")
xb$flag <- factor(xb$flag) xb$flag <- factor(xb$flag)
xb$link_id <- factor(xb$link_id) xb$link_id <- factor(xb$link_id)
xc <- sqldf("select *, 1.0 * latency / 1000.0 as lat from xb where vanilla = 1 and link_id = 5") xc <- sqldf("select *, 1.0 * latency / 1000.0 as lat from xb where vanilla = 1 and link_id = 5")
@ -136,3 +136,7 @@ ggplot(data=xd, aes(x=packet_id, y=lat, color=link_id)) +
#coord_cartesian(ylim=c(0,1000),xlim=c(3200,3500)) + #coord_cartesian(ylim=c(0,1000),xlim=c(3200,3500)) +
geom_line() + geom_line() +
theme_classic() theme_classic()
ggplot(data=sqldf("select * from xb where vanilla = 1 and way= 'server'"), aes(x=packet_id, y=link_id, color=flag)) +
geom_point() +
theme_classic()

View file

@ -475,7 +475,7 @@ void algo_lightning_update_used(struct light_ctx *lightc, struct timespec *now)
}*/ }*/
// Swap them // Swap them
printf("Link %d will be disabled, %d will be enabled\n", used_to_not, not_to_used); //printf("Link %d will be disabled, %d will be enabled\n", used_to_not, not_to_used);
lightc->status[used_to_not].used = LINK_NOT_USED; lightc->status[used_to_not].used = LINK_NOT_USED;
lightc->status[not_to_used].used = LINK_SLOW; lightc->status[not_to_used].used = LINK_SLOW;
lightc->last_update_used = *now; lightc->last_update_used = *now;
@ -483,14 +483,14 @@ void algo_lightning_update_used(struct light_ctx *lightc, struct timespec *now)
void algo_lightning_link_cat(struct light_ctx *lightc) { void algo_lightning_link_cat(struct light_ctx *lightc) {
uint8_t used = 0; uint8_t used = 0;
printf("---\n"); //printf("---\n");
for (int i = 0; i < lightc->total_links; i++) { for (int i = 0; i < lightc->total_links; i++) {
if (lightc->status[lightc->stats[i].link_id].used != LINK_NOT_USED) { if (lightc->status[lightc->stats[i].link_id].used != LINK_NOT_USED) {
if (used < lightc->fast_count) lightc->status[lightc->stats[i].link_id].used = LINK_FAST; if (used < lightc->fast_count) lightc->status[lightc->stats[i].link_id].used = LINK_FAST;
else lightc->status[lightc->stats[i].link_id].used = LINK_SLOW; else lightc->status[lightc->stats[i].link_id].used = LINK_SLOW;
used++; used++;
} }
printf("Link ID=%d, status=%s, ooo=%ld\n", lightc->stats[i].link_id, link_cat_str[lightc->status[lightc->stats[i].link_id].used], lightc->stats[i].ooo); //printf("Link ID=%d, status=%s, ooo=%ld\n", lightc->stats[i].link_id, link_cat_str[lightc->status[lightc->stats[i].link_id].used], lightc->stats[i].ooo);
} }
} }