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

Allow override of shell #61

Closed
mqudsi opened this issue Apr 17, 2018 · 4 comments
Closed

Allow override of shell #61

mqudsi opened this issue Apr 17, 2018 · 4 comments
Labels
feature-request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mqudsi
Copy link

mqudsi commented Apr 17, 2018

hyperfine can't be used to benchmark shell-specific shell functions without launching a new instance of a shell within the shell itself, breaking some of the underlying assumptions. As most shells support the -c argument, it would useful if it were possible to pass in a --shell SHELL option to override hyperfine's default.

e.g. I'm using hyperfine to reassess some assumptions made in the development of fish shell, and would like to be able to benchmark one version of a shell builtin against another, or benchmark the time a completion script takes to execute (which uses fish-specific language so would return an error under sh).

This would be a straightforward replacement of sh with whatever the user provided, but some might even find it useful to evaluate the performance of command1 executed under shell foo and command2 executed under shell bar (and not losing the benefit of the startup timing analysis that hyperfine provides).

@sharkdp sharkdp added feature-request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 17, 2018
@sharkdp
Copy link
Owner

sharkdp commented Apr 17, 2018

Thank you for the feedback. Sounds like a good idea to me!

but some might even find it useful to evaluate the performance of command1 executed under shell foo and command2 executed under shell bar (and not losing the benefit of the startup timing analysis that hyperfine provides).

That would be a little bit more complicated and would probably require different (or additional) command line options. I think it would be okay to ask users to run hyperfine multiple times (one time for each shell) in this case.

@mqudsi
Copy link
Author

mqudsi commented May 14, 2018

David: I had some need of this again, pull request over at #62.

@jasonpeacock
Copy link
Contributor

I picked up the existing PR and updated it per the feedback & latest changes, it's available as #96.

@sharkdp
Copy link
Owner

sharkdp commented Nov 21, 2018

Released in v1.4.0. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants