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:
Herbert Wolverson 2024-03-15 08:32:06 -05:00
parent 56dd4b6750
commit 318e20dad7
3 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
#define SECOND_IN_NANOS 1000000000 #define SECOND_IN_NANOS 1000000000
#define TWO_SECONDS_IN_NANOS 2000000000 #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 HALF_MBPS_IN_BYTES_PER_SECOND 62500
#define RTT_RING_SIZE 4 #define RTT_RING_SIZE 4
//#define TIMESTAMP_INTERVAL_NANOS 10000000 //#define TIMESTAMP_INTERVAL_NANOS 10000000

View File

@ -413,9 +413,9 @@ pub fn rtt_histogram() -> BusResponse {
.collect(); .collect();
let samples = valid_samples.len() as u32; let samples = valid_samples.len() as u32;
if samples > 0 { 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 median = f32::min(200.0, median);
let column = (median / 10.0) as usize; let column = median as usize;
result[usize::min(column, 19)] += 1; result[usize::min(column, 19)] += 1;
} }
} }

View File

@ -34,7 +34,7 @@ impl ThroughputEntry {
.recent_rtt_data .recent_rtt_data
.iter() .iter()
.filter(|n| **n != 0) .filter(|n| **n != 0)
.map(|n| *n as f32) .map(|n| *n as f32 / 10.0)
.collect(); .collect();
if shifted.len() < 5 { if shifted.len() < 5 {
return None; return None;