summaryrefslogtreecommitdiff
path: root/networkQuality.go
diff options
context:
space:
mode:
authorBjørn Ivar Teigen <[email protected]>2023-05-23 09:10:54 +0200
committerBjørn Ivar Teigen <[email protected]>2023-05-23 09:10:54 +0200
commitb522f9e23f7aae9d6a6b0f2de74f6df860e5ee09 (patch)
treef0f9846747dd1ec4d2aa36073e60cce64fe2732b /networkQuality.go
parent47b2c2f9f695f9bb5d9f0aa2c2860d4f7f28016a (diff)
Adressed pull request comments.
Fixed silly error in calculating sample variance
Diffstat (limited to 'networkQuality.go')
-rw-r--r--networkQuality.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/networkQuality.go b/networkQuality.go
index 676d98d..10ee8d3 100644
--- a/networkQuality.go
+++ b/networkQuality.go
@@ -550,7 +550,9 @@ timeout:
}
} else if probeMeasurement.Type == probe.SelfDown || probeMeasurement.Type == probe.SelfUp {
selfRtts.AddElement(probeMeasurement.Duration.Seconds())
- selfRttsQualityAttenuation.AddSample(probeMeasurement.Duration.Seconds())
+ if *printQualityAttenuation {
+ selfRttsQualityAttenuation.AddSample(probeMeasurement.Duration.Seconds())
+ }
}
if probeMeasurement.Type == probe.Foreign {