Run commands sequentialy instead of in groups.
Is there a way to make the commands execute sequentially?
Why would this be useful?
This would be useful if the steps are dependent on each other. This could also allow the user to get more specificity into the precise timings of each piece of their code. My current use case for this is that i need to benchmark a couple of python scripts that run sequentially as part of a data pipeline to find the ones that waste the most time so i can rewrite them.
How i think this should be solved
I want a flag that lets you run the commands in a sequence instead of running the same commands multiple times.
Example
Running
hyperfine --run-sequentially './command1.sh' './command2.sh'
should run it in this order
./command1.sh
./command2.sh
./command1.sh
./command2.sh
./command1.sh
./command2.sh
instead of
./command1.sh
./command1.sh
./command1.sh
./command2.sh
./command2.sh
./command2.sh
You can achieve this behavior manually although. You can use:
hyperfine "./command1.sh && ./command2"
Try this for example to see the output:
hyperfine --show-output -r 3 "echo 'command 1' && echo 'command 2' ; sleep 1"
if i run
hyperfine "./command1.sh && ./command2"
I will just get the total runtime, i would like to be able to see the runtime for each of the scripts
OK you're right. If you want separate times, then there must be a feature to run sequentially your scripts.