mirror of
https://github.com/nxshock/gwp.git
synced 2025-07-01 00:13:39 +05:00
Do not show zero estimate count
This commit is contained in:
parent
c25093e8e2
commit
2a342398b9
1 changed files with 7 additions and 2 deletions
9
gwp.go
9
gwp.go
|
@ -87,8 +87,13 @@ func (workerPool *WorkerPool) printProgress() {
|
|||
}
|
||||
|
||||
fmt.Fprintf(os.Stderr, newLine)
|
||||
fmt.Fprintf(os.Stderr, "Progress: %.1f%% (%d / %d)",
|
||||
float64(workerPool.processedCount*100)/float64(workerPool.EstimateCount), workerPool.processedCount, workerPool.EstimateCount)
|
||||
|
||||
if workerPool.EstimateCount == 0 {
|
||||
fmt.Fprintf(os.Stderr, "Progress: %d", workerPool.processedCount)
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "Progress: %.1f%% (%d / %d)",
|
||||
float64(workerPool.processedCount*100)/float64(workerPool.EstimateCount), workerPool.processedCount, workerPool.EstimateCount)
|
||||
}
|
||||
|
||||
if workerPool.errorCount > 0 {
|
||||
fmt.Fprintf(os.Stderr, " Errors: %d (%.1f%%)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue