()
| 76 | } |
| 77 | |
| 78 | func (p *progressTracker) finish() { |
| 79 | if !p.showProgress { |
| 80 | return |
| 81 | } |
| 82 | |
| 83 | elapsed := time.Since(p.startTime).Seconds() |
| 84 | if elapsed == 0 { |
| 85 | elapsed = 0.001 |
| 86 | } |
| 87 | linesPerSec := float64(p.lineCount) / elapsed |
| 88 | |
| 89 | // Clear the progress line and show final summary |
| 90 | fmt.Printf("\r\033[K✓ Loaded %d lines in %.2fs (%.0f lines/sec)\n", p.lineCount, elapsed, linesPerSec) |
| 91 | } |
| 92 | |
| 93 | // ParsedLine represents a parsed CSV line with its order |
| 94 | type ParsedLine struct { |
no outgoing calls
no test coverage detected