-
-
Notifications
You must be signed in to change notification settings - Fork 357
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 passing data to stdin #541
Comments
I have exactly the same request. I guess the issue is the heterogenity of input passing - some commands read only stdin, some have a |
Having a
hyperfine suggests this if the commands in question are faster than 5 ms. The reason for this is that a typical shell spawning time is on the order of a few milliseconds. We subtract this shell spawning time from the actual time, but the error being introduced by this procedure is likely to be on a similar order of magnitude. It is true that using |
In this case I would like to compare startup times of these apps, so I have made input is made as small as possible deliberately. Venerable jq got too bloated to start, around 30 ms. So I wanted to compare it with competitors. |
I want to compare 'ug ' and 'rg keyword'. but ugrep will exit with non-0. I guess ugrep will check if it's stdin. so --stdin-data is needed. |
This argument accepts a path to a file. The data contained in the file will be passed to the command via stdin. Closes #541
I would like to compare performance of http://kmkeen.com/jshon/ and https://github.com/jsqry/jsqry-cli2
Both are really fast so hyperfine suggests running with
--shell=none
for accurate results.But the latter tool can only process data from stdin therefore I have to call it via shell to provide fixed stdin input like
'jsqry < sample1'
. And therefore I cannot reliably measure its performance.I suggest new parameter to hyperfine
--stdin-data=FILEPATH
which should open given file as stdin before forking to measured process. This parameter would obviate the need for shell in my test.The text was updated successfully, but these errors were encountered: