mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-22 00:07:21 -06:00
These numbers line up on the iZones tracker, with wireshark dumps for comparison. This is a WIP - don't apply this. Unbreaking some of my previous code.
This commit is contained in:
parent
56dd4b6750
commit
318e20dad7
@ -10,7 +10,7 @@
|
||||
|
||||
#define SECOND_IN_NANOS 1000000000
|
||||
#define TWO_SECONDS_IN_NANOS 2000000000
|
||||
#define MS_IN_NANOS_T10 1000
|
||||
#define MS_IN_NANOS_T10 10000
|
||||
#define HALF_MBPS_IN_BYTES_PER_SECOND 62500
|
||||
#define RTT_RING_SIZE 4
|
||||
//#define TIMESTAMP_INTERVAL_NANOS 10000000
|
||||
|
@ -413,9 +413,9 @@ pub fn rtt_histogram() -> BusResponse {
|
||||
.collect();
|
||||
let samples = valid_samples.len() as u32;
|
||||
if samples > 0 {
|
||||
let median = valid_samples[valid_samples.len() / 2] as f32 / 100.0;
|
||||
let median = valid_samples[valid_samples.len() / 2] as f32 / 10.0;
|
||||
let median = f32::min(200.0, median);
|
||||
let column = (median / 10.0) as usize;
|
||||
let column = median as usize;
|
||||
result[usize::min(column, 19)] += 1;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ impl ThroughputEntry {
|
||||
.recent_rtt_data
|
||||
.iter()
|
||||
.filter(|n| **n != 0)
|
||||
.map(|n| *n as f32)
|
||||
.map(|n| *n as f32 / 10.0)
|
||||
.collect();
|
||||
if shifted.len() < 5 {
|
||||
return None;
|
||||
|
Loading…
Reference in New Issue
Block a user