diff options
| author | Will Hawkins <[email protected]> | 2023-07-12 11:11:10 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-07-12 11:11:10 -0400 |
| commit | 399eda676f7889accf72231c6696b89de7ea3fae (patch) | |
| tree | ddbe2afa4ef2a1e28b9a8b36577832b12a74b138 /networkQuality.go | |
| parent | 06fd8c3b39979316ec8917d471416114a5b7c581 (diff) | |
[Bugfix] Duplicate bucket IDs caused incorrect results
The upload direction reused bucket IDs used during the test in the
download direction which caused an incorrect grand-total RPM
calculation. To solve the problem, this patch adds a global bucket
ID generator and passes that to everyone that needs it.
TODO: Make the bucket generator type more generic.
Signed-off-by: Will Hawkins <[email protected]>
Diffstat (limited to 'networkQuality.go')
| -rw-r--r-- | networkQuality.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/networkQuality.go b/networkQuality.go index 0fff8a6..9671eb3 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -471,14 +471,16 @@ func main() { } // All tests will accumulate data to these series because it will all matter for RPM calculation! - selfRtts := series.NewWindowSeries[float64, uint](series.Forever, 0) - foreignRtts := series.NewWindowSeries[float64, uint](series.Forever, 0) + selfRtts := series.NewWindowSeries[float64, uint64](series.Forever, 0) + foreignRtts := series.NewWindowSeries[float64, uint64](series.Forever, 0) var selfRttsQualityAttenuation *qualityattenuation.SimpleQualityAttenuation = nil if *printQualityAttenuation { selfRttsQualityAttenuation = qualityattenuation.NewSimpleQualityAttenuation() } + globalNumericBucketGenerator := series.NewNumericBucketGenerator[uint64](0) + for _, direction := range directions { timeoutDuration := specParameters.TestTimeout @@ -510,6 +512,7 @@ func main() { specParameters.EvalInterval, direction.CreateLgdc, &direction.Lgcc, + &globalNumericBucketGenerator, specParameters.MaxParallelConns, *calculateExtendedStats, direction.DirectionDebugging, @@ -531,7 +534,7 @@ func main() { if *debugCliFlag { responsivenessStabilizerDebugLevel = debug.Debug } - responsivenessStabilizer := stabilizer.NewStabilizer[int64, uint]( + responsivenessStabilizer := stabilizer.NewStabilizer[int64, uint64]( specParameters.MovingAvgDist, specParameters.StdDevTolerance, specParameters.TrimmedMeanPct, "milliseconds", responsivenessStabilizerDebugLevel, responsivenessStabilizerDebugConfig) @@ -628,8 +631,8 @@ func main() { ) } - perDirectionSelfRtts := series.NewWindowSeries[float64, uint](series.Forever, 0) - perDirectionForeignRtts := series.NewWindowSeries[float64, uint](series.Forever, 0) + perDirectionSelfRtts := series.NewWindowSeries[float64, uint64](series.Forever, 0) + perDirectionForeignRtts := series.NewWindowSeries[float64, uint64](series.Forever, 0) responsivenessStabilizationCommunicationChannel := rpm.ResponsivenessProber( proberOperatorCtx, @@ -637,6 +640,7 @@ func main() { generateForeignProbeConfiguration, generateSelfProbeConfiguration, &direction.Lgcc, + &globalNumericBucketGenerator, direction.CreateLgdc().Direction(), // TODO: This could be better! specParameters.ProbeInterval, sslKeyFileConcurrentWriter, |
