diff options
| author | Will Hawkins <[email protected]> | 2022-03-17 17:19:09 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-17 17:19:09 -0400 |
| commit | d5dfc589d93715e07959a96eac6c469fdb405d7e (patch) | |
| tree | 1e20f8d884b724715b1ac477dd04c82445135d79 /networkQuality.go | |
| parent | 0a005d29c22ea9ea00b9c65c0cdfc6a9d5673646 (diff) | |
| parent | 07e8d26d30aff5f0b0642016c684685efe89658a (diff) | |
Merge pull request #7 from richb-hanover/main
Add Dockerfile, minor tweaks to format of displayed stats
Diffstat (limited to 'networkQuality.go')
| -rw-r--r-- | networkQuality.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/networkQuality.go b/networkQuality.go index 7e4d294..09ec953 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -418,6 +418,10 @@ func main() { fmt.Printf("Test will end earlier than %v\n", timeoutAbsoluteTime) } + // print the banner + dt := time.Now().UTC() + fmt.Printf("%s UTC Go Responsiveness to %s...\n", dt.Format("01-02-2006 15:04:05"),configHostPort) + if len(*profile) != 0 { f, err := os.Create(*profile) if err != nil { @@ -612,24 +616,24 @@ func main() { } } } - + fmt.Printf( - "Download: %f MBps (%f Mbps), using %d parallel connections.\n", - utilities.ToMBps(downloadSaturation.RateBps), + "Download: %7.3f Mbps (%7.3f MBps), using %d parallel connections.\n", utilities.ToMbps(downloadSaturation.RateBps), + utilities.ToMBps(downloadSaturation.RateBps), len(downloadSaturation.Lbcs), ) fmt.Printf( - "Upload: %f MBps (%f Mbps), using %d parallel connections.\n", - utilities.ToMBps(uploadSaturation.RateBps), + "Upload: %7.3f Mbps (%7.3f MBps), using %d parallel connections.\n", utilities.ToMbps(uploadSaturation.RateBps), + utilities.ToMBps(uploadSaturation.RateBps), len(uploadSaturation.Lbcs), ) if totalRTTsCount != 0 { rpm := float64(time.Minute.Seconds()) / (totalRTTTime / (float64(totalRTTsCount))) fmt.Printf("Total RTTs measured: %d\n", totalRTTsCount) - fmt.Printf("RPM: %v\n", rpm) + fmt.Printf("RPM: %5.0f\n", rpm) } else { fmt.Printf("Error occurred calculating RPM -- no probe measurements received.\n") } |
