benchmark: Add --databases to benchmark sqlite databases

Rescued from commit 11d6e2e260 which removed
db benchmarks in favor of benchmarking arbitrary git-annex commands. Which
is nice and general, but microbenchmarks are useful too.
This commit is contained in:
Joey Hess 2019-10-29 15:16:15 -04:00
parent 27e10fdbd7
commit 25f912de5b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 190 additions and 21 deletions

View file

@ -4,12 +4,13 @@ git-annex benchmark - benchmark git-annex commands
# SYNOPSIS
git annex benchmark [criterionopts] -- commmand [; command]
git annex benchmark [criterionopts] ( -- commmand [; command] | --databases )
# DESCRIPTION
When git-annex is built with benchmarking support, this command can be used
to benchmark any other git-annex command. For example "git annex benchmark -- get ."
to benchmark any other git-annex command. For example
"git annex benchmark -- get ."
will benchmark "git annex get".
The command being benchmarked is run in the current git-annex repository.
@ -18,7 +19,7 @@ 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 command can be listed,
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:
@ -38,6 +39,9 @@ used.
Any options that git-annex usually accepts can be included after the
command to benchmark.
The --databases option benchmark's git-annex's use of sqlite databases,
instead of a command.
# OUTPUT
The output of the commands being benchmarked goes to standard output and