-
Notifications
You must be signed in to change notification settings - Fork 52
feat: Track table generation with progress bars #226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Thank you @Matt711 -- this looks very cool. I am not sure I will have time to review it properly. The screen recording looks really nice One question I had was what do you think about showing progress by default? It seems like this might interact weirdly with #225 from @kevinjqliu -- specifically logging) |
|
Just merged #225 which defines the logging level based on the given param (default, tpchgen-rs/tpchgen-cli/bin/main.rs Lines 177 to 192 in b91de80
I think we should take this into consideration when rendering the process bar. i.e. turn progress bar off for |
Yeah, I was thinking we could potentially go all the way and enable the progress bar by default -- though I am not sure how that would interact with the printing of the default logging |
|
|
||
| /// Tracks progress for all tables being generated | ||
| #[derive(Clone, Debug)] | ||
| pub struct ProgressTracker { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing some other users have asked for is to reuse some of the tpchgen-cli machinery -- I suspect they may have ideas about using the ProgressTracker, etc
What do you think about abstracting the interface out -- e.g. so this is like Box<dyn ProgressTracker> or something
A default implementaion using multi_progress seems good
| tables: Mutex<HashMap<Table, TableProgress>>, | ||
| // MultiProgress is unused but we need to it alive to | ||
| // manage the registered progress bars. | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why allow dead code?
I had some time to think about the different interactions when implementing
LMK what you think! |
|
i tested this out locally and found an edge case where skip generation (because the file already exists) has some weird interactions |
That sounds like a good idea to me |
Closes #216
Adds progress bars via
--progressflag. The basic design isstraightforward. I'm using a global thread-safe
ProgressTrackerthat holds a
HashMap<Table, TableProgress>. EachTableProgresscontains counters for parts and buffers, plus an
indicatif::ProgressBarfor visualizing the bars. The tracker is cloned to all tasks and they all
update the same
ProgressTracker. Updates happen at two points:after each buffer/chunk write and after each file completes. The
MultiProgresscoordinator is stored to keep the display alive. The progress visualization
is disabled by default.
tpchgen-rsis usually too fast to turn it on untilabout sf10 from local macbook experiments. As @clflushopt said,
So lets keep going 🚀
Screen.Recording.2026-01-13.at.10.43.42.AM.mov