From 69bb03f79251a728d68a4973ce99de69e4a4db6d Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Thu, 16 Dec 2021 20:55:40 -0500 Subject: Bugfix: Calculation of RPM was off by a factor of 5 The factor of five being included to account for the fact that a single test accumulated five RTTs was being applied twice. This patch fixes that. --- networkQuality.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networkQuality.go b/networkQuality.go index 762ca67..ef80d03 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -412,7 +412,7 @@ func main() { fmt.Printf("Upload: %f MBps (%f Mbps), using %d parallel connections.\n", toMBps(uploadSaturation.RateBps), toMbps(uploadSaturation.RateBps), len(uploadSaturation.Lbcs)) if totalRTTsCount != 0 { - rpm := float64(60) / (totalRTTTime / (float64(totalRTTsCount) * 5)) + rpm := float64(60) / (totalRTTTime / (float64(totalRTTsCount))) fmt.Printf("Total RTTs measured: %d\n", totalRTTsCount) fmt.Printf("RPM: %v\n", rpm) } else { -- cgit v1.2.3