mirror of
https://github.com/nxshock/gwp.git
synced 2025-07-01 00:13:39 +05:00
Show ETA for first period
This commit is contained in:
parent
a43e9e76b2
commit
0e63308e92
1 changed files with 5 additions and 7 deletions
12
gwp.go
12
gwp.go
|
@ -123,14 +123,12 @@ func (workerPool *WorkerPool) printProgress() error {
|
|||
workerPool.errorCount, float64(workerPool.errorCount*100)/float64(workerPool.estimateCount))
|
||||
}
|
||||
|
||||
if workerPool.currentSpeed > 0 {
|
||||
if workerPool.estimateCount > 0 {
|
||||
fmt.Fprintf(buf, " ETA: %s", fmtDuration(time.Until(workerPool.eta.Average())))
|
||||
}
|
||||
if workerPool.estimateCount > 0 {
|
||||
fmt.Fprintf(buf, " ETA: %s", fmtDuration(time.Until(workerPool.eta.Average())))
|
||||
}
|
||||
|
||||
if workerPool.ShowSpeed {
|
||||
fmt.Fprintf(buf, " Speed: %.2f rps", workerPool.currentSpeed)
|
||||
}
|
||||
if workerPool.currentSpeed > 0 && workerPool.ShowSpeed {
|
||||
fmt.Fprintf(buf, " Speed: %.2f rps", workerPool.currentSpeed)
|
||||
}
|
||||
|
||||
fmt.Fprint(buf, endLine)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue