-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Add possibility to pass float values or range to --parameter-scan #184
Comments
Thank you for the feedback. What CLI would you propose for this? We can't let |
I was thinking in use edit: Can edit2: Or instead of adding a floating point option, add a way to format the variable generate by
|
Another possibility would be to keep |
You can already do this - sort of. With hyperfine -P var 1 5 'sleep $(echo "{var}/10" | bc -l)' With hyperfine -S zsh -P var 1 5 'sleep $(({var}.0/10))' |
@piyushrungta25 has added support for hyperfine --parameter-scan var 0.0 1.6 --parameter-step-size 0.1 … |
I see two issues with this.
|
Good point. I would definitely not choose 0.1 as the default, yes. Requiring the step size to be set for float arguments sounds like a good idea to me!
I'd be okay with this, as long as it comes with proper unit tests. I could imagine that the reason for the absence in the standard library is the following unfortunate property of floating point numbers: Imagine that someone chooses I guess this could probably be circumvented by computing N = (end - start) / stepsize and testing if it is close to an integer number. In this special case, we could round
👍 |
Perhaps a |
This has been fully implemented by @piyushrungta25 🎆 |
Released in hyperfine v1.7.0 |
When using hyperfine, I am missing the possibility of specifying a range or floating point values on
--parameter-scan
:or
The text was updated successfully, but these errors were encountered: