Skip to content

--output overwrites previous commands and runs #529

@StripedMonkey

Description

@StripedMonkey

Currently I'm working on a set of benchmarks where I want to save the output of (at least) one run from each. --output should arguably be allowed N times, where N is the number of commands being benchmarked.

However, I would also argue that keeping each runs output is extremely useful, specifically for debugging/figuring out why statistical outliers exist.

As an arbitrary example:

$ hyperfine --output ./example.log "ls" "pwd"

will only show output from a single pwd. Passing multiple outputs does not work, as hyperfine only expects one.

As a proposal for how this could change there are two things that would be nice to see:

  1. Allow multiple outputs, the same way --prepare is allowed per command
    $ hyperfine --output ./ls.log "ls" --output ./pwd.log "pwd"
    
  2. Allow some parameter, like N, for the run number
    $ hyperfine --output "./ls-{N}.log" "ls"
    

For short running commands like ls this is a problem as it may run somewhere in the neighborhood of 5k times, so it may be a problem to create a new logfile for each run. Longer running commands obviously do not have this problem.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions