From 9234d9c1c06582ae056c9bd09eba00e423fe91f4 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 22 Oct 2019 10:38:13 +0200 Subject: [PATCH] Scheduler V2 --- src/algo_lightning.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/algo_lightning.c b/src/algo_lightning.c index c3a3f5b..362a09b 100644 --- a/src/algo_lightning.c +++ b/src/algo_lightning.c @@ -319,6 +319,8 @@ void algo_lightning_update_stats (struct light_ctx *lightc) { int64_t delta = 0; switch (lightc->historic[i].state) { case IN_ORDER: + lightc->stats[l].ooo += delta; + lightc->stats[l].meas_occ += 1; break; case OOO_ONGOING: timespec_diff(&now, &lightc->historic[i].detected_at, &temp_time); @@ -465,12 +467,12 @@ void algo_lightning_update_used(struct light_ctx *lightc, struct timespec *now) } // Do we have a good link not used? - for (int i = 0; i < lightc->used; i++) { + /*for (int i = 0; i < lightc->used; i++) { if (lightc->status[lightc->stats[i].link_id].used == LINK_NOT_USED) { not_to_used = lightc->stats[i].link_id; break; } - } + }*/ // Swap them printf("Link %d will be disabled, %d will be enabled\n", used_to_not, not_to_used);