diff options
| author | Will Hawkins <[email protected]> | 2024-01-27 22:04:12 -0500 | 
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2024-01-27 22:04:12 -0500 | 
| commit | 59b565b068c007e0e99bfc382f32fda3bc0cfe6f (patch) | |
| tree | 2d337b0041e39afc4477ea732887f69e727015c0 | |
| parent | e461216c7c560c270b1759f28adc62403f3b28e2 (diff) | |
[Bugfix] Do not advance the interval when stable
By advancing the stability algorithm's interval when the measurement is
complete, we incorrectly expelled one of those intervals from the RPM
calculation. As a result, the final RPM calculation did not include all
the probe measurements that factored into stability calculation.
Signed-off-by: Will Hawkins <[email protected]>
| -rw-r--r-- | networkQuality.go | 12 | 
1 files changed, 10 insertions, 2 deletions
diff --git a/networkQuality.go b/networkQuality.go index e88a000..5a6d4ab 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -636,7 +636,11 @@ func main() {  							utilities.Conditional(baselineStableResponsiveness, "stable", "unstable"))  					} -					baselineResponsivenessStabilizer.Interval() +					// Do not tick an interval if we are stable. Doing so would expel one of the +					// intervals that we need for our RPM calculations! +					if !baselineStableResponsiveness { +						baselineResponsivenessStabilizer.Interval() +					}  				}  			}  		} @@ -951,7 +955,11 @@ func main() {  								utilities.Conditional(direction.StableResponsiveness, "stable", "unstable"))  						} -						responsivenessStabilizer.Interval() +						// Do not tick an interval if we are stable. Doing so would expel one of the +						// intervals that we need for our RPM calculations! +						if !direction.StableResponsiveness { +							responsivenessStabilizer.Interval() +						}  					}  				}  			}  | 
