mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Make the country RTTs actually add up
This commit is contained in:
parent
bad4429729
commit
019d301913
@ -82,18 +82,27 @@ impl TimeBuffer {
|
|||||||
// Store the country
|
// Store the country
|
||||||
let rtt = [
|
let rtt = [
|
||||||
if total_rtt[0] > 0.0 {
|
if total_rtt[0] > 0.0 {
|
||||||
|
rtt_count[0] += 1;
|
||||||
(total_rtt[0] / rtt_count[0] as f64) as f32
|
(total_rtt[0] / rtt_count[0] as f64) as f32
|
||||||
} else {
|
} else {
|
||||||
0.0
|
0.0
|
||||||
},
|
},
|
||||||
if total_rtt[1] > 0.0 {
|
if total_rtt[1] > 0.0 {
|
||||||
|
rtt_count[1] += 1;
|
||||||
(total_rtt[1] / rtt_count[1] as f64) as f32
|
(total_rtt[1] / rtt_count[1] as f64) as f32
|
||||||
} else {
|
} else {
|
||||||
0.0
|
0.0
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
country_summary.push((last_country, total_bytes, rtt));
|
if rtt_count[0] > 0 {
|
||||||
|
total_rtt[0] = (total_rtt[0] / rtt_count[0] as f64) as f64;
|
||||||
|
}
|
||||||
|
if rtt_count[1] > 0 {
|
||||||
|
total_rtt[1] = (total_rtt[1] / rtt_count[1] as f64) as f64;
|
||||||
|
}
|
||||||
|
|
||||||
|
country_summary.push((last_country, total_bytes, total_rtt));
|
||||||
}
|
}
|
||||||
|
|
||||||
last_country = country.to_string();
|
last_country = country.to_string();
|
||||||
|
Loading…
Reference in New Issue
Block a user