Skip to content

feat: progress indicator during CSV loading#112

Merged
vmvarela merged 1 commit intomasterfrom
issue-84/progress-indicator
Apr 29, 2026
Merged

feat: progress indicator during CSV loading#112
vmvarela merged 1 commit intomasterfrom
issue-84/progress-indicator

Conversation

@vmvarela
Copy link
Copy Markdown
Owner

Summary

Closes #84

  • Shows Loading... N rows (updated in-place with \r) every 10,000 rows when stderr is a TTY
  • When --max-rows is set, shows Loading... N / MAX rows instead
  • Clears the progress line with ANSI erase (\r\x1b[K) before printing the final summary
  • Final summary changed from Loaded N rowsLoaded N rows in X.Xs (includes elapsed time)
  • Zero overhead when stderr is not a TTY — single boolean check per row, progress_interval constant for easy tuning
  • README updated to document the new behaviour

Changes

  • src/main.zig: progress_interval constant, printProgress helper, is_tty/start_ts hoisted before loading, progress calls in both insert loops, elapsed time in final summary
  • README.md: flags table and description section updated

- Print 'Loading... N rows\r' to stderr every 10,000 rows on TTY
- Show 'Loading... N / MAX rows\r' when --max-rows is set
- Clear progress line with ANSI erase before final summary
- Change final summary to 'Loaded N rows in X.Xs' (elapsed time)
- Zero overhead when stderr is not a TTY (single bool check per row)
- Update README to document new progress behaviour
@github-actions github-actions Bot added type:feature New functionality type:docs Documentation only labels Apr 29, 2026
@vmvarela vmvarela merged commit e1a17ab into master Apr 29, 2026
5 checks passed
@vmvarela vmvarela deleted the issue-84/progress-indicator branch April 29, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:docs Documentation only type:feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Progress indicator during CSV loading

1 participant