Fix small bug + improve graph

This commit is contained in:
Quentin 2019-10-16 16:45:10 +02:00
parent b1a0194832
commit e8c2da7218
2 changed files with 9 additions and 6 deletions

View file

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

View file

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