From fdfe96b53ef8f4532e5b6f65f86ba39fe242cc5b Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Wed, 11 May 2022 16:49:09 -0400 Subject: [Refactor/Bugfix] Refactor RPM calculation and fix calculation algorithm As it turns out, I was misreading the algorithm for calculating the RPM based upon the measurements taken during execution. This patch fixes that mistake and also (starts) renames "RTT" as "measurement" (those are technically a better nomenclature according to the spec.) --- utilities/utilities.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utilities/utilities.go') diff --git a/utilities/utilities.go b/utilities/utilities.go index 160368b..b1b180f 100644 --- a/utilities/utilities.go +++ b/utilities/utilities.go @@ -61,10 +61,10 @@ func ToMBps(bytes float64) float64 { return float64(bytes) / float64(1024*1024) } -type GetLatency struct { - Delay time.Duration - RoundTripCount uint16 - Err error +type MeasurementResult struct { + Delay time.Duration + MeasurementCount uint16 + Err error } func SeekForAppend(file *os.File) (err error) { -- cgit v1.2.3