diff options
| author | Will Hawkins <[email protected]> | 2023-02-10 18:15:50 -0500 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-02-10 18:15:50 -0500 |
| commit | 14d738b379c5a64f70c77795f06b3716eb6c4c57 (patch) | |
| tree | 104df9aabc0e9351ea660445c479fb3c329996c8 | |
| parent | c6fe792af023b1bbfc7f56a0319973e4bd1a5de2 (diff) | |
[Cleanup] Output and comments
| -rw-r--r-- | networkQuality.go | 31 | ||||
| -rw-r--r-- | stabilizer/rev3.go | 4 |
2 files changed, 18 insertions, 17 deletions
diff --git a/networkQuality.go b/networkQuality.go index 759d562..1af90bb 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -572,11 +572,6 @@ timeout: // Calculate the RPM // First, let's do a double-sided trim of the top/bottom 10% of our measurements. - - if *debugCliFlag { - fmt.Printf("") - } - selfRttsTotalCount := selfRtts.Len() foreignRttsTotalCount := foreignRtts.Len() @@ -590,14 +585,15 @@ timeout: selfProbeRoundTripTimeMean := selfRttsTrimmed.CalculateAverage() foreignProbeRoundTripTimeMean := foreignRttsTrimmed.CalculateAverage() + // Second, let's do the P90 calculations. selfProbeRoundTripTimeP90 := selfRtts.Percentile(90) - // The specification indicates that we want to calculate the foreign probes as such: + foreignProbeRoundTripTimeP90 := foreignRtts.Percentile(90) + + // Note: The specification indicates that we want to calculate the foreign probes as such: // 1/3*tcp_foreign + 1/3*tls_foreign + 1/3*http_foreign // where tcp_foreign, tls_foreign, http_foreign are the P90 RTTs for the connection // of the tcp, tls and http connections, respectively. However, we cannot break out - // the individual RTTs so we assume that they are roughly equal. The good news is that - // we already did that roughly-equal split up when we added them to the foreignRtts IMS. - foreignProbeRoundTripTimeP90 := foreignRtts.Percentile(90) + // the individual RTTs so we assume that they are roughly equal. // This is 60 because we measure in seconds not ms p90Rpm := 60.0 / (float64(selfProbeRoundTripTimeP90+foreignProbeRoundTripTimeP90) / 2.0) @@ -605,10 +601,14 @@ timeout: if *debugCliFlag { fmt.Printf( - `Total Self Probes: %d, Total Foreign Probes: %d -Trimmed Self Probes Count: %d, Trimmed Foreign Probes Count: %d -P90 Self RTT: %f, P90 Foreign RTT: %f -Trimmed Mean Self RTT: %f, Trimmed Mean Foreign RTT: %f + `Total Self Probes: %d +Total Foreign Probes: %d +Trimmed Self Probes Count: %d +Trimmed Foreign Probes Count: %d +P90 Self RTT: %f +P90 Foreign RTT: %f +Trimmed Mean Self RTT: %f +Trimmed Mean Foreign RTT: %f `, selfRttsTotalCount, foreignRttsTotalCount, @@ -624,8 +624,9 @@ Trimmed Mean Self RTT: %f, Trimmed Mean Foreign RTT: %f if !testRanToStability { fmt.Printf("Test did not run to stability, these results are estimates:\n") } - fmt.Printf("P90 RPM: %5.0f\n", p90Rpm) - fmt.Printf("Trimmed Mean RPM: %5.0f\n", meanRpm) + + fmt.Printf("RPM: %5.0f (P90)\n", p90Rpm) + fmt.Printf("RPM: %5.0f (Double-Sided 10%% Trimmed Mean)\n", meanRpm) fmt.Printf( "Download: %7.3f Mbps (%7.3f MBps), using %d parallel connections.\n", diff --git a/stabilizer/rev3.go b/stabilizer/rev3.go index d0518c0..fa9b378 100644 --- a/stabilizer/rev3.go +++ b/stabilizer/rev3.go @@ -85,7 +85,7 @@ func (r3 *ProbeStabilizer) IsStable() bool { } // Stability is determined by whether or not the standard deviation of the values - // is within 5% of the average. + // is within some percentage of the average. stabilityCutoff := r3.movingAverages.CalculateAverage() * (r3.stabilityStandardDeviation / 100.0) isStable := stddev <= stabilityCutoff @@ -145,7 +145,7 @@ func (r3 *ThroughputStabilizer) IsStable() bool { } // Stability is determined by whether or not the standard deviation of the values - // is within 5% of the average. + // is within some percentage of the average. stabilityCutoff := r3.movingAverages.CalculateAverage() * (r3.stabilityStandardDeviation / 100.0) isStable := stddev <= stabilityCutoff |
