about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-02-16 16:32:01 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-02-16 16:32:01 +0100
commit790be714a2b5f06b17cc74e1f740de623396784c (patch)
tree4cfdaf499c24282466c40ef42cc6187803323517
parent1ee0268759dfab17f3a2c4b21a89510bf7274358 (diff)
downloadhtping-790be714a2b5f06b17cc74e1f740de623396784c.tar.gz
htping-790be714a2b5f06b17cc74e1f740de623396784c.tar.xz
htping-790be714a2b5f06b17cc74e1f740de623396784c.zip
fix display units
-rw-r--r--go.mod6
-rw-r--r--htping.go4
2 files changed, 7 insertions, 3 deletions
diff --git a/go.mod b/go.mod
index 87d861f..5053ee0 100644
--- a/go.mod
+++ b/go.mod
@@ -2,4 +2,8 @@ module github.com/leahneukirchen/htping
 
 go 1.14
 
-require github.com/prometheus/client_golang v1.5.1
+require (
+	github.com/prometheus/client_golang v1.12.1
+	golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
+	google.golang.org/protobuf v1.27.1 // indirect
+)
diff --git a/htping.go b/htping.go
index eca94b2..6cc0565 100644
--- a/htping.go
+++ b/htping.go
@@ -221,7 +221,7 @@ func ping(url string, seq int, myTransport *transport, results chan result) {
 	durSummary.WithLabelValues(url, string(myTransport.addr)).Observe(dur)
 
 	if !quiet {
-		fmt.Printf("%d bytes from %v: %s %d seq=%d time=%.3f ms\n",
+		fmt.Printf("%d bytes from %v: %s %d seq=%d time=%.3f s\n",
 			written,
 			myTransport.addr,
 			res.Proto,
@@ -271,7 +271,7 @@ func stats(results chan result, done chan bool) {
 			if nrecv > 0 {
 				mdev := math.Sqrt(sum2/float64(nrecv) -
 					sum/float64(nrecv)*sum/float64(nrecv))
-				fmt.Printf("rtt min/avg/max/mdev = %.3f/%.3f/%.3f/%.3f ms\n",
+				fmt.Printf("rtt min/avg/max/mdev = %.3f/%.3f/%.3f/%.3f s\n",
 					min, sum/float64(nrecv), max, mdev)
 			}