|git-annex-benchmark(1)||General Commands Manual||git-annex-benchmark(1)|
The command being benchmarked is run in the current git-annex repository. It does not run just once; the benchmarking process will run it several times to get a statistically meaningful result.
When benchmarking an action like "git annex get", the first run will often do much more than subseqent runs. To make the benchmark repeat an action like getting a file each time, additional commands can be listed, separated by ';'. (Note that ';' needs to be escaped from the shell.) The combined script will be run repeatedly by the benchmark. An example of using this:
git annex benchmark -- get . ';' drop .
Note that git-annex benchmark does not fork new git-annex processes when benchmarking; it calls the command to benchmark internally, and so avoids git-annex's startup overhead. (So don't try to use it to optimise git-annex startup.)
Any options that git-annex usually accepts can be included after the command to benchmark.
The --databases=N option benchmark's git-annex's use of sqlite databases, instead of a command. N is the number of items to benchmark.
The benchmark report is output to standard output by default, although criterion options can be used to redirect it to a file. For example:
git annex benchmark -o bench -- find >/dev/null