Skip to content
Myr

Update man page

Before adoption: this commit came in with the history the project adopted, so no landing records it.

closes #647

authored by David Peter · committed by David Peter · parent ac617c8 · Browse files · 1 file+185 added−65 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+185 added−65 removed

  • other:+185 added−65 removed

1 file+185 added−65 removed

modified:doc/hyperfine.1+185 added-65 removed
1 unmodified line
2.SH NAME3hyperfine \- command\-line benchmarking tool4.SH SYNOPSIS5.B hyperfine6.RB [ \-ihV ]7.RB [ \-w8.IR warmupruns ]9.RB [ \-r10.IR runs ]11.RB [ \-p12.IR cmd... ]13.RB [ \-c14.IR cmd ]15.RB [ \-s16.IR style ]17.RI [ cmd... ]6.RB [ \-ihVN ]7.RB [ \-\-warmup8.IR NUM ]9.RB [ \-\-min\-runs10.IR NUM ]11.RB [ \-\-max\-runs12.IR NUM ]13.RB [ \-\-runs14.IR NUM ]15.RB [ \-\-setup16.IR CMD ]17.RB [ \-\-prepare18.IR CMD ]19.RB [ \-\-cleanup20.IR CMD ]21.RB [ \-\-parameter\-scan22.IR VAR23.IR MIN24.IR MAX ]25.RB [ \-\-parameter\-step\-size26.IR DELTA ]27.RB [ \-\-parameter\-list28.IR VAR29.IR VALUES ]30.RB [ \-\-shell31.IR SHELL ]32.RB [ \-\-style33.IR TYPE ]34.RB [ \-\-sort35.IR METHOD ]36.RB [ \-\-time-unit37.IR UNIT ]38.RB [ \-\-export\-asciidoc39.IR FILE ]40.RB [ \-\-export\-csv41.IR FILE ]42.RB [ \-\-export\-json43.IR FILE ]44.RB [ \-\-export\-markdown45.IR FILE ]46.RB [ \-\-export\-orgmode47.IR FILE ]48.RB [ \-\-output49.IR WHERE ]50.RB [ \-\-input51.IR WHERE ]52.RB [ \-\-command\-name53.IR NAME ]54.RI [ COMMAND... ]55.SH DESCRIPTION56A command\-line benchmarking tool which includes:57.LP58.RS
21 unmodified lines
80* Parameterized benchmarks (e.g. vary the number of threads)81.RE82.SH OPTIONS83.HP47\fB\-w\fR, \fB\-\-warmup\fR \fIwarmupruns\fP84\fB\-w\fR, \fB\-\-warmup\fR \fINUM\fP85.IP49Perform \fIwarmupruns\fP (number) before the actual benchmark. This can be used to fill50(disk) caches for I/O\-heavy programs.86Perform \fINUM\fP warmup runs before the actual benchmark. This can be used87to fill (disk) caches for I/O\-heavy programs.88.HP52\fB\-m\fR, \fB\-\-min\-runs\fR \fIminruns\fP89\fB\-m\fR, \fB\-\-min\-runs\fR \fINUM\fP90.IP54Perform at least \fIminruns\fP (number) runs for each command. Default: 10.91Perform at least \fINUM\fP runs for each command. Default: 10.92.HP56\fB\-M\fR, \fB\-\-max\-runs\fR \fImaxruns\fP93\fB\-M\fR, \fB\-\-max\-runs\fR \fINUM\fP94.IP58Perform at most \fImaxruns\fP (number) runs for each command. Default: no limit.95Perform at most \fINUM\fP runs for each command. By default, there is no96limit.97.HP60\fB\-r\fR, \fB\-\-runs\fR \fIruns\fP98\fB\-r\fR, \fB\-\-runs\fR \fINUM\fP99.IP62Perform exactly \fIruns\fP (number) runs for each command. If this option is not specified,100Perform exactly \fINUM\fP runs for each command. If this option is not specified,101\fBhyperfine\fR automatically determines the number of runs.102.HP65\fB\-s\fR, \fB\-\-setup\fR \fIcmd\fP103\fB\-s\fR, \fB\-\-setup\fR \fICMD...\fP104.IP67Execute \fIcmd\fP once before each set of timing runs. This is useful68for compiling software or doing other one-off setup.69The \fB\-\-setup\fR option can only be specified once.105Execute \fICMD\fP once before each set of timing runs. This is useful106for compiling your software or with the provided parameters, or to do any107other work that should happen once before a series of benchmark runs,108not every time as would happen with the \fB\-\-prepare\fR option.109.HP71\fB\-p\fR, \fB\-\-prepare\fR \fIcmd...\fP110\fB\-p\fR, \fB\-\-prepare\fR \fICMD...\fP111.IP73Execute \fIcmd\fP before each timing run. This is useful for clearing disk caches,112Execute \fICMD\fP before each timing run. This is useful for clearing disk caches,113for example.114The \fB\-\-prepare\fR option can be specified once for all commands or multiple times,115once for each command. In the latter case, each preparation command will be116run prior to the corresponding benchmark command.117.HP79\fB\-c\fR, \fB\-\-cleanup\fR \fIcmd\fP118\fB\-c\fR, \fB\-\-cleanup\fR \fICMD...\fP119.IP81Execute \fIcmd\fP after the completion of all benchmarking runs for each individual120Execute \fICMD\fP after the completion of all benchmarking runs for each individual121command to be benchmarked. This is useful if the commands to be benchmarked122produce artifacts that need to be cleaned up.123.HP85\fB\-P\fR, \fB\-\-parameter\-scan\fR \fIvar\fP \fImin\fP \fImax\fP124\fB\-P\fR, \fB\-\-parameter\-scan\fR \fIVAR\fP \fIMIN\fP \fIMAX\fP125.IP87Perform benchmark runs for each value in the range \fImin..max\fP. Replaces the88string '{\fIvar\fP}' in each command by the current parameter value.126Perform benchmark runs for each value in the range \fIMIN..MAX\fP. Replaces the127string '{\fIVAR\fP}' in each command by the current parameter value.128.IP129.RS130Example:131.RS
1 unmodified line
133.RE134.RE135.IP136This performs benchmarks for 'make \-j 1', 'make \-j 2', ..., 'make \-j 8'.137.IP138To have the value increase following different patterns, use shell139arithmetics.140.IP141.RS142Example:143.RS144\fBhyperfine\fR \fB\-P\fR size 0 3 'sleep $((2**{size}))'145.RE146.RE147.IP148This performs benchmarks with power of 2 increases: 'sleep 1', 'sleep1492', 'sleep 4', ...150.IP151The exact syntax may vary depending on your shell and OS.152.HP100\fB\-D\fR, \fB\-\-parameter\-step\-size\fR \fIdelta\fP153\fB\-D\fR, \fB\-\-parameter\-step\-size\fR \fIDELTA\fP154.IP155This argument requires \fB\-\-parameter\-scan\fR to be specified as well. Traverse the103range \fImin..max\fP in steps of \fIdelta\fP.156range \fIMIN..MAX\fP in steps of \fIDELTA\fP.157.IP158.RS159Example:160.RS
2 unmodified lines
163.RE164.IP165This performs benchmarks for 'sleep 0.3', 'sleep 0.5' and 'sleep 0.7'.166.HP114\fB\-L\fR, \fB\-\-parameter\-list\fR \fIvar\fP \fIvalues\fP167\fB\-L\fR, \fB\-\-parameter\-list\fR \fIVAR\fP \fIVALUES\fP168.IP116Perform benchmark runs for each value in the comma\-separated list of \fIvalues\fP.117Replaces the string '{\fIvar\fP}' in each command by the current parameter value.169Perform benchmark runs for each value in the comma\-separated list of \fIVALUES\fP.170Replaces the string '{\fIVAR\fP}' in each command by the current parameter value.171.IP172.RS173Example:174.RS
1 unmodified line
176.RE177.RE178.IP179This performs benchmarks for 'gcc \-O2 main.cpp' and 'clang \-O2 main.cpp'.180.IP181The option can be specified multiple times to run benchmarks for all182possible parameter combinations.183.HP128\fB\-\-style\fR \fItype\fP184\fB\-S\fR, \fB\-\-shell\fR \fISHELL\fP185.IP130Set output style \fItype\fP (default: auto). Set this to 'basic' to disable output131coloring and interactive elements. Set it to 'full' to enable all effects even132if no interactive terminal was detected. Set this to 'nocolor' to keep the133interactive output without any colors. Set this to 'color' to keep the colors134without any interactive output. Set this to 'none' to disable all the output135of the tool. In hyperfine versions v0.4.0..v1.12.0 this option took the \fB\-s\fR,136short option, which is now used by \fB\--setup\fR.186Set the shell to use for executing benchmarked commands. This can be187the name or the path to the shell executable, or a full command line188like "bash \fB\-\-norc\fR". It can also be set to "default" to explicitly189select the default shell on this platform. Finally, this can also be190set to "none" to disable the shell. In this case, commands will be191executed directly. They can still have arguments, but more complex192things like "sleep 0.1; sleep 0.2" are not possible without a shell.193.HP138\fB\-S\fR, \fB\-\-shell\fR \fIshell\fP194\fB\-N\fR195.IP140Set the \fIshell\fP to use for executing benchmarked commands.196An alias for '\-\-shell=none'.197.HP198\fB\-i\fR, \fB\-\-ignore\-failure\fR199.IP200Ignore non\-zero exit codes of the benchmarked programs.201.HP146\fB\-u\fR, \fB\-\-time\-unit\fR \fIunit\fP202\fB\-\-style\fR \fITYPE\fP203.IP148Set the time \fIunit\fP to be used. Default: second. Possible values: millisecond, second.204Set output style \fITYPE\fP (default: auto). Set this to 'basic' to disable output205coloring and interactive elements. Set it to 'full' to enable all effects even206if no interactive terminal was detected. Set this to 'nocolor' to keep the207interactive output without any colors. Set this to 'color' to keep the colors208without any interactive output. Set this to 'none' to disable all the output209of the tool.210.HP150\fB\-\-export\-asciidoc\fR \fIfile\fP 211\fB\-\-sort\fR \fIMETHOD\fP212.IP152Export the timing summary statistics as an AsciiDoc table to the given \fIfile\fP.213Specify the sort order of the speed comparison summary and the214exported tables for markup formats (Markdown, AsciiDoc, org\-mode):215.RS216.IP "auto (default)"217the speed comparison will be ordered by time and218the markup tables will be ordered by command (input order).219.IP "command"220order benchmarks in the way they were specified221.IP "mean\-time"222order benchmarks by mean runtime223.RE224.HP154\fB\-\-export\-csv\fR \fIfile\fP225\fB\-u\fR, \fB\-\-time\-unit\fR \fIUNIT\fP226.IP227Set the time unit to be used. Possible values: millisecond, second. If228the option is not given, the time unit is determined automatically.229This option affects the standard output as well as all export formats230except for CSV and JSON.231.HP232\fB\-\-export\-asciidoc\fR \fIFILE\fP 233.IP234Export the timing summary statistics as an AsciiDoc table to the given \fIFILE\fP.235The output time unit can be changed using the \fB\-\-time\-unit\fR option.236.HP237\fB\-\-export\-csv\fR \fIFILE\fP238.IP156Export the timing summary statistics as CSV to the given \fIfile\fP. If you need the239Export the timing summary statistics as CSV to the given \fIFILE\fP. If you need the240timing results for each individual run, use the JSON export format.241The output time unit is always seconds.242.HP159\fB\-\-export\-json\fR \fIfile\fP243\fB\-\-export\-json\fR \fIFILE\fP244.IP245Export the timing summary statistics and timings of individual runs as JSON to162the given \fIfile\fP.246the given \fIFILE\fP. The output time unit is always seconds.247.HP164\fB\-\-export\-markdown\fR \fIfile\fP248\fB\-\-export\-markdown\fR \fIFILE\fP249.IP166Export the timing summary statistics as a Markdown table to the given \fIfile\fP.250Export the timing summary statistics as a Markdown table to the given \fIFILE\fP.251The output time unit can be changed using the \fB\-\-time\-unit\fR option.252.HP253\fB\-\-export\-orgmode\fR \fIFILE\fP254.IP255Export the timing summary statistics as an Emacs org\-mode table to the256given \fIFILE\fP. The output time unit can be changed using the \fB\-\-time\-unit\fR option.257.HP258\fB\-\-show\-output\fR259.IP260Print the stdout and stderr of the benchmark instead of suppressing it. This261will increase the time it takes for benchmarks to run, so it should only be262used for debugging purposes or when trying to benchmark output speed.263.HP174\fB\-n\fR, \fB\-\-command\-name\fR \fIname\fP264\fB\-\-output\fR \fIWHERE\fP265.IP176Identify a command with the given \fIname\fP. Commands and names are paired in177the same order: the first command executed gets the first name passed as178option.266Control where the output of the benchmark is redirected. Note that267some programs like 'grep' detect when standard output is \fI\,/dev/null\/\fP and268apply certain optimizations. To avoid that, consider using269\-\-output=pipe.270.IP271\fIWHERE\fP can be:272.RS273.IP null274Redirect output to \fI\,/dev/null\/\fP (the default).275.IP pipe276Feed the output through a pipe before discarding it.277.IP inherit278Don't redirect the output at all (same as \&'\-\-show\-output').279.IP "<FILE>"280Write the output to the given file.281.RE282.HP283\fB\-\-input\fR \fIWHERE\fP284.IP285Control where the input of the benchmark comes from.286.IP287\fIWHERE\fP can be:288.RS289.IP null290Read from \fI\,/dev/null\/\fP (the default).291.IP "<FILE>"292Read the input from the given file.293.RE294.HP295\fB\-n\fR, \fB\-\-command\-name\fR \fiNAME\fP296.IP297Give a meaningful \fiNAME\fP to a command. This can be specified multiple times298if several commands are benchmarked.299.HP300\fB\-h\fR, \fB\-\-help\fR301.IP182Print help message.302Print help303.HP304\fB\-V\fR, \fB\-\-version\fR305.IP186Show version information.306Print version307.SH EXAMPLES308.LP309Basic benchmark of 'find . -name todo.txt':310.RS
36 unmodified lines
347.RE348.RE349.SH AUTHOR350.LP231David Peter (sharkdp)351David Peter <mail@david-peter.de>352.LP233Source, bug tracker, and additional information can be found on GitHub at:353Source, bug tracker, and additional information can be found on GitHub:354.I https://github.com/sharkdp/hyperfine