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: Named commands #326

Closed
matthew-hollick opened this issue Oct 1, 2020 · 4 comments · Fixed by #330
Closed

Feature request: Named commands #326

matthew-hollick opened this issue Oct 1, 2020 · 4 comments · Fixed by #330
Labels

Comments

@matthew-hollick
Copy link

Hi,
Just started using hyperfine, I think it's going to find a permanent place in my toolkit.

I've been using it to test two instances of the same service running on 2 different local ports (the services in question run on remote servers that I have configured SSH tunnels to).

My invocation looks something like:
hyperfine --export-markdown results.md 'curl localhost:1000/query' 'curl localhost:1001/query'
The report is not great for sharing - the person(s) I share it with won't know which port refers to which instance. In a few days time I probably won't either.

I would love it if I could name the commands being ran, something like:
hyperfine --export-markdown results.md --name 'Current platform' 'curl localhost:1000/query' --name 'New platform' 'curl localhost:1001/query'

Cheers!

@sharkdp
Copy link
Owner

sharkdp commented Oct 1, 2020

Thank you for the feedback! Sounds like a great idea!

scampi added a commit to scampi/hyperfine that referenced this issue Oct 9, 2020
CLI option `--name` can be used to define the name to identify a
command. If not passed, then the command itself is used. Commands
and names are paired in the same order: The first command executed gets
the first name passed as option.

Close sharkdp#326
scampi added a commit to scampi/hyperfine that referenced this issue Oct 14, 2020
CLI option `--name` can be used to define the name to identify a
command. If not passed, then the command itself is used. Commands
and names are paired in the same order: The first command executed gets
the first name passed as option.

Close sharkdp#326
sharkdp pushed a commit that referenced this issue Oct 15, 2020
CLI option `--name` can be used to define the name to identify a
command. If not passed, then the command itself is used. Commands
and names are paired in the same order: The first command executed gets
the first name passed as option.

Close #326
@sharkdp
Copy link
Owner

sharkdp commented Oct 15, 2020

closed via #330 by @scampi

@matthew-hollick
Copy link
Author

Brilliant!!!
Many thanks.

@sharkdp
Copy link
Owner

sharkdp commented Oct 16, 2020

Released in hyperfine v1.11.0.

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

Successfully merging a pull request may close this issue.

2 participants