diff --git a/r/lightning_begin.R b/r/lightning_begin.R index b237fb9..5ed5f68 100644 --- a/r/lightning_begin.R +++ b/r/lightning_begin.R @@ -10,7 +10,7 @@ ggplot(data=link_info, aes(x=timestamp, y=link, color=speed)) + theme_classic() -xx <- read.csv("../res/tmp_light/g.csv") +xx <- read.csv("../res/tmp_light/k.csv") 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)) + geom_line() + @@ -63,5 +63,7 @@ xx3 <- sqldf("select packet_id,1.0 * MIN(latency) / 1000.0 as lat,flag,way from xx3$flag <- factor(xx3$flag) ggplot(data=xx3, aes(x=lat, group=flag, color=flag)) + stat_ecdf(pad = FALSE) + + geom_vline(xintercept = 200) + + geom_vline(xintercept = 400) + coord_cartesian(xlim=c(0,1200)) + theme_classic() diff --git a/src/algo_lightning.c b/src/algo_lightning.c index c26c190..fb358bb 100644 --- a/src/algo_lightning.c +++ b/src/algo_lightning.c @@ -68,10 +68,10 @@ struct light_ctx { int sent_past_links; struct timespec window; size_t monit_pkt_size; - uint8_t csv; - uint8_t is_measlat; - uint8_t explain; - uint8_t disable_scheduler; + int csv; + int is_measlat; + int explain; + int disable_scheduler; enum schedule_group_target sched_strat; }; @@ -321,8 +321,9 @@ void algo_lightning_update_stats (struct light_ctx *lightc, struct stat_entry *s } // Sort - if (!lightc->disable_scheduler) + if (!lightc->disable_scheduler) { qsort(stats, lightc->total_links, sizeof(struct stat_entry), compare_stat_entry_max); + } } int send_message(struct evt_core_ctx* ctx, struct buffer_packet* bp) {