Skip to content
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

add progress bar duration for initial time measurement and shell spawn time #438

Closed
wants to merge 1 commit into from

Conversation

blesson3
Copy link

@blesson3 blesson3 commented Oct 6, 2021

I used the suggested format in #416 AT instead of ETA for duration elapsed after the progress bar. Let me know if that should be changed to something else.

closes #416

@sharkdp
Copy link
Owner

sharkdp commented Oct 17, 2021

Thank you very much for your contribution!

This seems to break ETA estimation afterwards? If I do hyperfine 'sleep 1', ETA initially goes up (2s, 3s), stays at 3s, then goes down eventually. Correct behavior (on master) would be to count down from 9s (10 is the default number of runs for long commands, the first has been run already).

length: u64,
msg: &str,
option: OutputStyleOption,
show_duration: bool,
Copy link
Owner

@sharkdp sharkdp Oct 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has a lot of arguments already. Adding a bool argument further decreases readability at the call sites. I suggest adding a simple enum

enum ProgressBarTemplate {
  ShowDuration,
  ShowETA,
}

and then add a impl ProgressBarTemplate block with a get_template(&self) -> &'static str function.

@sharkdp
Copy link
Owner

sharkdp commented Nov 14, 2021

@blesson3 Are you still interested in getting this merged? Otherwise, I'd like to close it.

@sharkdp
Copy link
Owner

sharkdp commented Nov 16, 2021

I'm closing this due to inactivity. Please feel free to comment in case it should be re-opened.

@sharkdp sharkdp closed this Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ticking elapsed time on "initial time measurement"
2 participants