Browse code

dispatcher: fix an error in initialisation /

training of the latency estimator

Julien Chavanton authored on 28/09/2020 19:57:25
Showing 1 changed files
... ...
@@ -2574,6 +2574,8 @@ int ds_mark_dst(struct sip_msg *msg, int state)
2574 2574
 }
2575 2575
 
2576 2576
 static inline void latency_stats_update(ds_latency_stats_t *latency_stats, int latency) {
2577
+	int training_count = 10000;
2578
+
2577 2579
 	/* after 2^21 ~24 days at 1s interval, the average becomes a weighted average */
2578 2580
 	if (latency_stats->count < 2097152) {
2579 2581
 		latency_stats->count++;