News for hackers. Stuff that matters.
Re:Hyperfine: A command-line benchmarking tool by oguz-ismail on Tuesday November 19, 2024 @07:19AM (#42182636)
You still need to quote the command though. `hyperfine -N ls "$dir"' won't work, you need `hyperfine -N "ls ${dir@Q}"' or something. It'd be better if you could specify commands like with `find -exec'.
Re:Hyperfine: A command-line benchmarking tool by PhilipRoman on Tuesday November 19, 2024 @07:32AM (#42182728)
Oh that sucks, I really hate when programs impose useless shell parsing instead of letting the user give an argument vector natively.
Re:Hyperfine: A command-line benchmarking tool by sharkdp on Tuesday November 19, 2024 @08:20AM (#42183105)
I don't think it's useless. You can use hyperfine to run multiple benchmarks at the same time, to get a comparison between multiple tools. So if you want it to work without quotes, you need to (1) come up with a way to separate commands and (2) come up with a way to distinguish hyperfine arguments from command arguments. It's doable, but it's also not a great UX if you have to write something like

    hyperfine -N -- ls "$dir" \; my_ls "$dir"
Re:Hyperfine: A command-line benchmarking tool by oguz-ismail on Tuesday November 19, 2024 @08:53AM (#42183430)
> not a great UX

Looks fine to me. Obviously it's too late to undo that mistake, but a new flag to enable new behavior wouldn't hurt anyone.