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
Provenance
- Commit
0ce6578- Tree
476e31f- Author
David Peter <mail@david-peter.de>- Committer
David Peter <mail@david-peter.de>- Parent
ac617c8
1 file changed+185 added−65 removed
modified:doc/hyperfine.1+185 added-65 removed
1 unmodified line2 .SH NAME3 hyperfine \- 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 DESCRIPTION56 A command\-line benchmarking tool which includes:57 .LP58 .RS21 unmodified lines80 * 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 .IP49-Perform \fIwarmupruns\fP (number) before the actual benchmark. This can be used to fill50-(disk) caches for I/O\-heavy programs.86+Perform \fINUM\fP warmup runs before the actual benchmark. This can be used87+to 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 .IP54-Perform at least \fIminruns\fP (number) runs for each command. Default: 10.91+Perform 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 .IP58-Perform at most \fImaxruns\fP (number) runs for each command. Default: no limit.95+Perform at most \fINUM\fP runs for each command. By default, there is no96+limit.97 .HP60-\fB\-r\fR, \fB\-\-runs\fR \fIruns\fP98+\fB\-r\fR, \fB\-\-runs\fR \fINUM\fP99 .IP62-Perform exactly \fIruns\fP (number) runs for each command. If this option is not specified,100+Perform 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 .IP67-Execute \fIcmd\fP once before each set of timing runs. This is useful68-for compiling software or doing other one-off setup.69-The \fB\-\-setup\fR option can only be specified once.105+Execute \fICMD\fP once before each set of timing runs. This is useful106+for compiling your software or with the provided parameters, or to do any107+other work that should happen once before a series of benchmark runs,108+not 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 .IP73-Execute \fIcmd\fP before each timing run. This is useful for clearing disk caches,112+Execute \fICMD\fP before each timing run. This is useful for clearing disk caches,113 for example.114 The \fB\-\-prepare\fR option can be specified once for all commands or multiple times,115 once for each command. In the latter case, each preparation command will be116 run prior to the corresponding benchmark command.117 .HP79-\fB\-c\fR, \fB\-\-cleanup\fR \fIcmd\fP118+\fB\-c\fR, \fB\-\-cleanup\fR \fICMD...\fP119 .IP81-Execute \fIcmd\fP after the completion of all benchmarking runs for each individual120+Execute \fICMD\fP after the completion of all benchmarking runs for each individual121 command to be benchmarked. This is useful if the commands to be benchmarked122 produce 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 .IP87-Perform benchmark runs for each value in the range \fImin..max\fP. Replaces the88-string '{\fIvar\fP}' in each command by the current parameter value.126+Perform benchmark runs for each value in the range \fIMIN..MAX\fP. Replaces the127+string '{\fIVAR\fP}' in each command by the current parameter value.128 .IP129 .RS130 Example:131 .RS1 unmodified line133 .RE134 .RE135 .IP136 This performs benchmarks for 'make \-j 1', 'make \-j 2', ..., 'make \-j 8'.137+.IP138+To have the value increase following different patterns, use shell139+arithmetics.140+.IP141+.RS142+Example:143+.RS144+\fBhyperfine\fR \fB\-P\fR size 0 3 'sleep $((2**{size}))'145 .RE146+.RE147+.IP148+This performs benchmarks with power of 2 increases: 'sleep 1', 'sleep149+2', 'sleep 4', ...150+.IP151+The 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 .IP155 This argument requires \fB\-\-parameter\-scan\fR to be specified as well. Traverse the103-range \fImin..max\fP in steps of \fIdelta\fP.156+range \fIMIN..MAX\fP in steps of \fIDELTA\fP.157 .IP158 .RS159 Example:160 .RS2 unmodified lines163 .RE164 .IP165 This 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 .IP116-Perform benchmark runs for each value in the comma\-separated list of \fIvalues\fP.117-Replaces the string '{\fIvar\fP}' in each command by the current parameter value.169+Perform benchmark runs for each value in the comma\-separated list of \fIVALUES\fP.170+Replaces the string '{\fIVAR\fP}' in each command by the current parameter value.171 .IP172 .RS173 Example:174 .RS1 unmodified line176 .RE177 .RE178 .IP179 This performs benchmarks for 'gcc \-O2 main.cpp' and 'clang \-O2 main.cpp'.180+.IP181+The option can be specified multiple times to run benchmarks for all182+possible parameter combinations.183 .HP128-\fB\-\-style\fR \fItype\fP184+\fB\-S\fR, \fB\-\-shell\fR \fISHELL\fP185 .IP130-Set output style \fItype\fP (default: auto). Set this to 'basic' to disable output131-coloring and interactive elements. Set it to 'full' to enable all effects even132-if no interactive terminal was detected. Set this to 'nocolor' to keep the133-interactive output without any colors. Set this to 'color' to keep the colors134-without any interactive output. Set this to 'none' to disable all the output135-of the tool. In hyperfine versions v0.4.0..v1.12.0 this option took the \fB\-s\fR,136-short option, which is now used by \fB\--setup\fR.186+Set the shell to use for executing benchmarked commands. This can be187+the name or the path to the shell executable, or a full command line188+like "bash \fB\-\-norc\fR". It can also be set to "default" to explicitly189+select the default shell on this platform. Finally, this can also be190+set to "none" to disable the shell. In this case, commands will be191+executed directly. They can still have arguments, but more complex192+things 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 .IP140-Set the \fIshell\fP to use for executing benchmarked commands.196+An alias for '\-\-shell=none'.197 .HP198 \fB\-i\fR, \fB\-\-ignore\-failure\fR199 .IP200 Ignore non\-zero exit codes of the benchmarked programs.201 .HP146-\fB\-u\fR, \fB\-\-time\-unit\fR \fIunit\fP202+\fB\-\-style\fR \fITYPE\fP203 .IP148-Set the time \fIunit\fP to be used. Default: second. Possible values: millisecond, second.204+Set output style \fITYPE\fP (default: auto). Set this to 'basic' to disable output205+coloring and interactive elements. Set it to 'full' to enable all effects even206+if no interactive terminal was detected. Set this to 'nocolor' to keep the207+interactive output without any colors. Set this to 'color' to keep the colors208+without any interactive output. Set this to 'none' to disable all the output209+of the tool.210 .HP150-\fB\-\-export\-asciidoc\fR \fIfile\fP 211+\fB\-\-sort\fR \fIMETHOD\fP212 .IP152-Export the timing summary statistics as an AsciiDoc table to the given \fIfile\fP.213+Specify the sort order of the speed comparison summary and the214+exported tables for markup formats (Markdown, AsciiDoc, org\-mode):215+.RS216+.IP "auto (default)"217+the speed comparison will be ordered by time and218+the markup tables will be ordered by command (input order).219+.IP "command"220+order benchmarks in the way they were specified221+.IP "mean\-time"222+order benchmarks by mean runtime223+.RE224 .HP154-\fB\-\-export\-csv\fR \fIfile\fP225+\fB\-u\fR, \fB\-\-time\-unit\fR \fIUNIT\fP226 .IP227+Set the time unit to be used. Possible values: millisecond, second. If228+the option is not given, the time unit is determined automatically.229+This option affects the standard output as well as all export formats230+except for CSV and JSON.231+.HP232+\fB\-\-export\-asciidoc\fR \fIFILE\fP 233+.IP234+Export the timing summary statistics as an AsciiDoc table to the given \fIFILE\fP.235+The output time unit can be changed using the \fB\-\-time\-unit\fR option.236+.HP237+\fB\-\-export\-csv\fR \fIFILE\fP238+.IP156-Export the timing summary statistics as CSV to the given \fIfile\fP. If you need the239+Export the timing summary statistics as CSV to the given \fIFILE\fP. If you need the240 timing results for each individual run, use the JSON export format.241+The output time unit is always seconds.242 .HP159-\fB\-\-export\-json\fR \fIfile\fP243+\fB\-\-export\-json\fR \fIFILE\fP244 .IP245 Export the timing summary statistics and timings of individual runs as JSON to162-the given \fIfile\fP.246+the given \fIFILE\fP. The output time unit is always seconds.247 .HP164-\fB\-\-export\-markdown\fR \fIfile\fP248+\fB\-\-export\-markdown\fR \fIFILE\fP249 .IP166-Export the timing summary statistics as a Markdown table to the given \fIfile\fP.250+Export the timing summary statistics as a Markdown table to the given \fIFILE\fP.251+The output time unit can be changed using the \fB\-\-time\-unit\fR option.252 .HP253+\fB\-\-export\-orgmode\fR \fIFILE\fP254+.IP255+Export the timing summary statistics as an Emacs org\-mode table to the256+given \fIFILE\fP. The output time unit can be changed using the \fB\-\-time\-unit\fR option.257+.HP258 \fB\-\-show\-output\fR259 .IP260 Print the stdout and stderr of the benchmark instead of suppressing it. This261 will increase the time it takes for benchmarks to run, so it should only be262 used 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 .IP176-Identify a command with the given \fIname\fP. Commands and names are paired in177-the same order: the first command executed gets the first name passed as178-option.266+Control where the output of the benchmark is redirected. Note that267+some programs like 'grep' detect when standard output is \fI\,/dev/null\/\fP and268+apply certain optimizations. To avoid that, consider using269+\-\-output=pipe.270+.IP271+\fIWHERE\fP can be:272+.RS273+.IP null274+Redirect output to \fI\,/dev/null\/\fP (the default).275+.IP pipe276+Feed the output through a pipe before discarding it.277+.IP inherit278+Don't redirect the output at all (same as \&'\-\-show\-output').279+.IP "<FILE>"280+Write the output to the given file.281+.RE282 .HP283+\fB\-\-input\fR \fIWHERE\fP284+.IP285+Control where the input of the benchmark comes from.286+.IP287+\fIWHERE\fP can be:288+.RS289+.IP null290+Read from \fI\,/dev/null\/\fP (the default).291+.IP "<FILE>"292+Read the input from the given file.293+.RE294+.HP295+\fB\-n\fR, \fB\-\-command\-name\fR \fiNAME\fP296+.IP297+Give a meaningful \fiNAME\fP to a command. This can be specified multiple times298+if several commands are benchmarked.299+.HP300 \fB\-h\fR, \fB\-\-help\fR301 .IP182-Print help message.302+Print help303 .HP304 \fB\-V\fR, \fB\-\-version\fR305 .IP186-Show version information.306+Print version307 .SH EXAMPLES308 .LP309 Basic benchmark of 'find . -name todo.txt':310 .RS36 unmodified lines347 .RE348 .RE349 .SH AUTHOR350 .LP231-David Peter (sharkdp)351+David Peter <mail@david-peter.de>352 .LP233-Source, bug tracker, and additional information can be found on GitHub at:353+Source, bug tracker, and additional information can be found on GitHub:354 .I https://github.com/sharkdp/hyperfine