[nextest-runner] with --show-progress=running, avoid output jumps up and down#2723
[nextest-runner] with --show-progress=running, avoid output jumps up and down#2723sunshowers merged 1 commit intomainfrom
Conversation
|
cc @glehmann would love a review from you -- this seems to fix the output sliding up and down quite nicely. This isn't perfect but terminals were really not built for the output rapidly changing like this, unfortunately. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2723 +/- ##
==========================================
- Coverage 77.91% 77.78% -0.13%
==========================================
Files 112 112
Lines 25692 25731 +39
==========================================
- Hits 20017 20016 -1
- Misses 5675 5715 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
75ceaa0 to
6c13edc
Compare
| let mut show_progress_sleep = | ||
| std::pin::pin!(crate::time::pausable_sleep(Duration::from_millis(100))); | ||
| std::pin::pin!(crate::time::pausable_sleep(Duration::from_millis(10))); |
There was a problem hiding this comment.
Also shortened this timeout -- 10ms is long enough that rapid-fire tests won't spam output, but is also less than 1 frame on 60fps.
glehmann
left a comment
There was a problem hiding this comment.
It completely removes the moving global bar for me
| if let Some(tb) = self.used_bars.get(id) { | ||
| // Reset the bar to 0. | ||
| tb.bar.set_prefix(prefix); | ||
| tb.bar.clone().with_elapsed(Duration::ZERO); |
There was a problem hiding this comment.
I don't think this is doing something useful, unless the new bar is reassigned to tb.bar.
Am I missing something?
There was a problem hiding this comment.
This is a bit confusing for sure -- but ProgressBar is a lightweight Arc'd handle, and calling with_elapsed on the clone also affects the original. I'll add a comment explaining this, thanks.
There was a problem hiding this comment.
console-rs/indicatif#742 submitted upstream to add a set_elapsed method
There was a problem hiding this comment.
I completely missed that—thanks for the explanation!
…p and down Use a free list of empty bars to provide padding corresponding to the number of formerly-used rows. This means that the overall progress bar slides up rapidly, but never slides down.
Use a free list of empty bars to provide padding corresponding to the number of formerly-used rows. This means that the overall progress bar slides up rapidly, but never slides down.