Commit Graph
13 Commits
Author SHA1 Message Date
David Peter 72d27729fa New Scheduler struct 2022-02-19 16:53:02 +01:00
David Peter 5c634c9f2f Move a few modules to util 2022-02-06 20:19:50 +01:00
David Peter b54b2f81f4 Rename to Options 2022-02-06 20:19:50 +01:00
David Peter 39a85b88cf Move convert_cli_arguments_to_options to HyperfineOptions 2022-02-06 20:19:50 +01:00
David Peter a35e7e2caf Fix formatting 2022-02-06 20:19:50 +01:00
David Peter ce7087b107 Use thiserror for to derive Error 2022-02-06 20:19:50 +01:00
David Peter f5de5487cc Fix clippy suggestions 2022-02-06 17:47:40 +01:00
Ævar Arnfjörð Bjarmason 017d55a4a1 Add --setup (-s) option, like --prepare but runs once per batch
Add a --setup option for the use-case of wanting to do one-off setup
before a set of benchmarks, not the once-per-test setup that --prepare
does. This is useful for the cases noted in the updated documentation.

Per the feedback on https://github.com/sharkdp/hyperfine/pull/448 this
new "--setup" option will steal the "-s" short option from
"--style" (initially this was called "--build" and used the
non-conflicting "-b").

Potential future work:

I'd prefer if this and --cleanup took N number of commands, so you
could do e.g.:

    hyperfine -L rev master,next \
        -b 'git worktree add /tmp/test-{r}'  \
        -b 'make -C /tmp/test-{r} all'  \
	'make -C /tmp/test-{r} test' \
	-c 'git worktree remove /tmp/test-{r}'

I.e. a shortcut around not providing these with &&, which makes things
a bit more readable.

But the --cleanup option doesn't do that, so let's just go with what
it's doing for consistency, so for this you'll now need to do:

    hyperfine -L rev master,next \
        -b 'git worktree add /tmp/test-{r} &&
	    make -C /tmp/test-{r} all'  \
	'make -C /tmp/test-{r} test' \
	-c 'git worktree remove /tmp/test-{r}'
2021-11-16 21:36:35 +01:00
rhysd f2bfedd3a6 Fix clippy warnings 2021-10-17 17:03:36 +02:00
rhysd 1b7d139f21 Add tests for options::Shell 2021-10-17 17:03:36 +02:00
rhysd e2fdaceb9f Parse --shell option value as shell command 2021-10-17 17:03:36 +02:00
David Peter 9df6174bc2 Re-order imports 2021-08-24 22:44:08 +02:00
David Peter 30c381fe2a Flat directory/module structure 2021-08-24 22:44:08 +02:00