Open CosmicHorrorDev opened 1 year ago
That sounds like a cool idea, thank you. It also sounds like a rather complex feature that is not easy to design. So before we go ahead trying to implement this, I'd like to discuss how this would work, what kind of implications this has on other features, what the CLI would look like, etc.
Note: we already have --export-json
, so that could probably be used for the "storing" side of things.
Slightly related: #577
I would also welcome this feature. It's currently possible to save report with --export-json
so could it be implemented in a way, that instead of defining one command, there would be a --import-json
flag?
# before - a single run
hyperfine 'command1' 'command2'
# after - two separate runs
hyperfine 'command1' --export-json baseline.json
hyperfine --import-json baseline.json 'command2'
The position of arguments would determine the order of compared commands the same way as position of commands in the 1st example. What do you think?
There are times when I want to have some baseline saved that I compare later changes to. It would be convenient if I had a way to save a benchmarking run and then load that to later runs. Something like
If you're interested in supporting this then I can work on adding it as a feature