-
-
Notifications
You must be signed in to change notification settings - Fork 340
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
--shell=none always gives the same performance #647
Comments
That does not work. You can not use shell syntax like Finally, this can also be set to "none" to disable the shell. In this case, commands will be executed directly. They can still have arguments, but more complex things like "sleep 0.1; sleep 0.2" are not possible without a shell. Maybe we should include a shell command with pipes here in the help text, to make this more clear. What happens instead is that your hyperfine --shell=none --input=sample_input.txt ./binary
Yes, this also doesn't work. But note that we have also have an output option: hyperfine --shell=none --input=sample_input.txt --output=/tmp/output.log ./binary
Did you see the help text that I quoted above? If not, where did you search for information? I'm always trying to improve the documentation. |
Thank you for your answer! That explains everything I needed to know. This seems to be entirely on me, I mostly use man pages for documentation-lookup and just assumed that it would show the same information that Thank you very much for taking your time, much appreciated! |
Thank you. Let's keep this open until the man page is updated |
The man page is now up to date and synced with the |
Background
I use hyperfine to benchmark some custom cpp algorithms, and to do that I usually pipe the input to the executable binary like this:
./binary < sample_input.txt
Most of the time these run at 5 ms or faster and hyperfine suggests to run without the shell, therefore I benchmark with the following command,
hyperfine --shell=none './binary < sample_input.txt'
The issue
However, this seem to always give approximately (varying with ~0.1ms) the same result (~0.5ms mean, ~0.4ms min), even for ridiculously large input.
When I remove the
--shell=none
option it takes around 100s to complete one run of said large input, and that's the time I get when I run the command without hyperfine. Seem to be independent on what binary I run, but I can provide an example if it's useful.Am I misunderstanding something or is this a bug? I expect that benchmarks with and without
--shell=none
would have similar performance and not 0.4ms vs. 100s.Additional info
I tried to pipe the output of the binary
hyperfine --shell=none './binary < sample_input.txt > output.txt'
but the output only appears if I remove the
--shell=none
option.I've used the command with absolute paths, and tried to print the output of the binary with
--show-output
without any results (only prints without--shell=none
). I'm on a linux system, I use zsh, and my hyperfine version is 1.16.1-1.I suspect that I misunderstand what "disabling the shell" really means, but I couldn't find anything that explains this behavior.
Thanks in advance!
The text was updated successfully, but these errors were encountered: