2019-01-04 17:43:53 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex benchmark - benchmark git-annex commands
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
2019-11-21 21:25:20 +00:00
|
|
|
git annex benchmark [criterionopts] ( -- commmand [; command] | --databases=N )
|
2019-01-04 17:43:53 +00:00
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
When git-annex is built with benchmarking support, this command can be used
|
2019-10-29 19:16:15 +00:00
|
|
|
to benchmark any other git-annex command. For example
|
|
|
|
"git annex benchmark -- get ."
|
2019-01-04 17:43:53 +00:00
|
|
|
will benchmark "git annex get".
|
|
|
|
|
|
|
|
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
|
2019-10-29 19:16:15 +00:00
|
|
|
action like getting a file each time, additional commands can be listed,
|
2019-01-04 17:43:53 +00:00
|
|
|
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.)
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
Before the "--" any of the criterion library's command-line options can be
|
|
|
|
used.
|
|
|
|
|
|
|
|
Any options that git-annex usually accepts can be included after the
|
|
|
|
command to benchmark.
|
|
|
|
|
2019-11-21 21:25:20 +00:00
|
|
|
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.
|
2019-10-29 19:16:15 +00:00
|
|
|
|
2019-01-04 17:43:53 +00:00
|
|
|
# OUTPUT
|
|
|
|
|
|
|
|
The output of the commands being benchmarked goes to standard output and
|
2019-11-22 21:26:13 +00:00
|
|
|
standard error as usual. It's often a good idea to use --quiet to avoid
|
2022-08-19 21:45:04 +00:00
|
|
|
unnecessary output, unless the generation of that output is part of what
|
2019-11-22 21:26:13 +00:00
|
|
|
you want to benchmark.
|
2019-01-04 17:43:53 +00:00
|
|
|
|
|
|
|
The benchmark report is output to standard output by default, although
|
2019-11-22 21:26:13 +00:00
|
|
|
criterion options can be used to redirect it to a file. For example:
|
|
|
|
|
|
|
|
git annex benchmark -o bench -- find >/dev/null
|
2019-01-04 17:43:53 +00:00
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|