feat: progress indicator during CSV loading#112
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #84
Loading... N rows(updated in-place with\r) every 10,000 rows when stderr is a TTY--max-rowsis set, showsLoading... N / MAX rowsinstead\r\x1b[K) before printing the final summaryLoaded N rows→Loaded N rows in X.Xs(includes elapsed time)Changes
src/main.zig:progress_intervalconstant,printProgresshelper,is_tty/start_tshoisted before loading, progress calls in both insert loops, elapsed time in final summaryREADME.md: flags table and description section updated