From 4c46eebcefd4b99ab5dd42d0e91ccb9c2a466fcd Mon Sep 17 00:00:00 2001 From: nxshock Date: Mon, 1 Feb 2021 23:24:48 +0500 Subject: [PATCH] Replace speed with rate per second --- gwp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gwp.go b/gwp.go index 4acc7fc..ebf8e27 100644 --- a/gwp.go +++ b/gwp.go @@ -52,7 +52,8 @@ func New(threadCount int) *WorkerPool { case <-tickerUpdateText.C: if workerPool.EstimateCount > 0 { fmt.Fprintf(os.Stderr, newLine) - fmt.Fprintf(os.Stderr, "%.1f%% (%d / %d) ETA: %s at %.2f speed"+endLine, float64(counter*100)/float64(workerPool.EstimateCount), counter, workerPool.EstimateCount, + fmt.Fprintf(os.Stderr, "%.1f%% (%d / %d) ETA: %s at %.2f rps"+endLine, + float64(counter*100)/float64(workerPool.EstimateCount), counter, workerPool.EstimateCount, time.Second*time.Duration(float64(workerPool.EstimateCount-counter)/currentSpeed), currentSpeed) } case <-tickerCalculateEta.C: