(bytes int64)
| 38 | } |
| 39 | |
| 40 | func (p *progressTracker) increment(bytes int64) { |
| 41 | if !p.showProgress { |
| 42 | return |
| 43 | } |
| 44 | p.current += bytes |
| 45 | p.lineCount++ |
| 46 | |
| 47 | // Update display every N lines OR every 0.5 seconds (whichever comes first) |
| 48 | if p.lineCount%p.updateEvery == 0 || time.Since(p.lastUpdate) > 500*time.Millisecond { |
| 49 | p.display() |
| 50 | p.lastUpdate = time.Now() |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | func (p *progressTracker) display() { |
| 55 | if !p.showProgress { |
no test coverage detected