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: Remote commands #722
Comments
Thank you for the feedback!
I wonder if it's possible to use the existing |
Use case: sometimes it is nice to run some benchmarks on different hosts, to compare performance across various configurations - amount of resources, choice of OS, and so on.
hyperfine
has nice support for comparing things when using--parameter-list
and--export-json
, with the varying parameters stored into the JSON as parameter fields across the runs.Currently, it is possible to compare things across hosts by using
ssh
as part of the command given tohyperfine
and using--parameter-list
for the hosts. This has a small drawback though: making the remote connection and spawning the remote shell takes time, and can skew the results. (Trivial example:hyperfine "ssh raspberrypi 'hostname'"
)Another existing workaround is to first
ssh
to each host, and runhyperfine
there. This has the drawback that the resulting json files will have to be combined manually afterwards for comparison, possibly with extra manual tagging, requiring extra work.One possible improvement for this would be to add
ssh
remote shell spawning time compensation tohyperfine
, similar to the local shell spawning compensation.Another possible implementation could be to add support for "remote hyperfines", taking inspiration from topgrade. The main
hyperfine
would run on your local machine, sending commands and parameters to be run with thehyperfine
installations on the remote hosts overssh
. This would ensure thathyperfine
only measures the time for the actual payload command, and with correct amount of shell spawning correction at the remote host, and so on. This would also let you collect the results into a single combined json locally, with all the varying parameters - including the host - collected for you automatically for easy processing. (This would also allow for an optimization - remotehyperfine
s could be safely parallelized for simultaneous execution, with the other parameters running serially on each.)Thank you for writing such an incredibly useful tool 🧡
The text was updated successfully, but these errors were encountered: