-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Better ETA estimation for long running benchmarks #670
Comments
This should actually be the case? Or would you expect any update on the initial timing run? |
Actually, something seems wrong with the ETA estimates at the moment. If I run e.g.
The ETA shows 5 seconds after the initial timing run (which is expected). But then the ETA time starts increasing... instead of decreasing. I'm pretty sure this was working correctly in the past. This seems like a regression. (note that ETA estimates are done by the "indicatif" dependency, not by hyperfine directly. but maybe we are using it incorrectly.) |
I did a git bisect, it seems in 2cd2773 the strange runaway time was introduced, most likely when indicatif was upgraded from 0.17.4 to 0.17.5 Before that, it was working correctly but doesn't update as often as I'd like to. hyperfine "sleep 5" only shows a new ETA after a run is complete, so after the first run it jumps to 5 seconds, and stays at 5 seconds until it has finished. That's ok for 5 seconds, but when the benchmark takes 2 hours that means the ETA will be stuck at 2 hours until it's actually finished |
Yeah, this is not great. I agree. I would expect indicatif to handle this. We are updating the ETA estimate every few milliseconds.
Thanks! I can actually reproduce the bug using a very simple program (indicatif 0.17.6): use std::thread;
use std::time::Duration;
use indicatif::{ProgressBar, ProgressStyle};
fn main() {
let pb = ProgressBar::new(2);
pb.enable_steady_tick(Duration::from_millis(100));
pb.set_style(
ProgressStyle::default_spinner()
.template("{wide_bar} ETA {eta_precise}")
.unwrap(),
);
for _ in 0..2 {
thread::sleep(Duration::from_millis(5000));
pb.inc(1);
}
pb.finish_and_clear();
} This shows the same problem (ETA jumps to 5 sec — which is fine, then increases). I will report this upstream, unless you want to do that? |
I can't actually program in rust, I'd prefer if you can do that :) |
I'm currently using hyperfine to benchmark something where a single benchmark run takes about 2 hours. It would be nice if the ETA would updated more often (say once every second) with a new estimate
The text was updated successfully, but these errors were encountered: