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

[Feature request] Option to disable the default output entirely #193

Closed
gmolau opened this issue Jul 17, 2019 · 7 comments
Closed

[Feature request] Option to disable the default output entirely #193

gmolau opened this issue Jul 17, 2019 · 7 comments
Assignees

Comments

@gmolau
Copy link

gmolau commented Jul 17, 2019

I think it would be nice to be able to disable the standard output (with the progress bar) entirely. This would make it possible to cleanly pipe the JSON output to another process (via --export-json /dev/stdout). It seems like making the --style option accept none would be a good way to implement this. I'm unfortunately not familiar with Rust (otherwise I would just submit a PR), but maybe this could be considered for the future.

@sharkdp
Copy link
Owner

sharkdp commented Jul 17, 2019

Great idea, thank you very much.

In the meantime, you can use process substitution to pipe the output to another process. Not as beautiful as it could be, I agree:

> hyperfine 'sleep 0.1' --export-json >(jq '.results[0].mean') >/dev/null
0.10603645827285715

@knidarkness
Copy link
Contributor

Hi @sharkdp, I am currently using hyperfine and find it quite nice tool. If this issue is still relevant I could implement it. Is it?

@sharkdp
Copy link
Owner

sharkdp commented Oct 10, 2019

It is, yes.

That would be great

@knidarkness
Copy link
Contributor

Great, could you assign it to me and I`ll check it on the weekend?

@sharkdp
Copy link
Owner

sharkdp commented Oct 15, 2019

closed via #224 by @knidarkness

@sharkdp sharkdp closed this as completed Oct 15, 2019
@sharkdp
Copy link
Owner

sharkdp commented Oct 15, 2019

This works now:

hyperfine --style=none --export-json /dev/stdout 'sleep 0.1' | jq '.results[].mean'

@gmolau
Copy link
Author

gmolau commented Oct 17, 2019

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants