-
Notifications
You must be signed in to change notification settings - Fork 228
fix: show continuous stats during batch updates #1204
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
fix: show continuous stats during batch updates #1204
Conversation
kindly review it and let me know for any changes thanks! |
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.
Thanks a lot for the PR!
src/execution/live_updater.rs
Outdated
if delta.has_any_change() { | ||
// Print periodic progress (do NOT merge here, final report_stats will merge) | ||
println!( | ||
"{}.{} ({update_title_owned}): {}", | ||
flow_name, import_op_name, delta | ||
); | ||
last_stats = current_stats; | ||
} |
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.
Is it possible to always show the latest stats (instead of the delta), and keep overwriting the stats line showing before? For users, they always see the last line showing the current stats.
Did a brief research, and indicatif crate seems good for this purpose.
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.
got it wil check and apply the changes
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.
Screen.Recording.2025-10-21.at.6.30.13.PM.mov
is this right?
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.
That's awesome! Thanks!
Please push your commits.
9c72aa6
to
c002510
Compare
please check and lmk for any updates |
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.
Thanks!
Summary
Fixes #939
Problem
Previously, when running
cocoindex update
, stats about processed documents were only printed once a full processing pass completed. For long-running updates, users had no visibility into ongoing progress, making it unclear if the process was still working.Solution
Implemented continuous stats reporting by spawning a background task.
Example Output