diff --git a/doc/execution-order.png b/doc/execution-order.png index 48350fc..f029ab8 100644 Binary files a/doc/execution-order.png and b/doc/execution-order.png differ diff --git a/doc/execution-order.svg b/doc/execution-order.svg index c875c9c..e338c85 100644 --- a/doc/execution-order.svg +++ b/doc/execution-order.svg @@ -7,9 +7,9 @@ viewBox="0 0 397.65199 482.07085" version="1.1" id="svg5" - inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)" + inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)" sodipodi:docname="execution-order.svg" - inkscape:export-filename="/home/shark/Informatik/rust/hyperfine/doc/execution-order.png" + inkscape:export-filename="execution-order.png" inkscape:export-xdpi="38.32" inkscape:export-ydpi="38.32" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" @@ -26,12 +26,12 @@ inkscape:pagecheckerboard="0" inkscape:document-units="mm" showgrid="false" - inkscape:zoom="0.38529391" - inkscape:cx="1022.596" - inkscape:cy="939.54249" - inkscape:window-width="1920" - inkscape:window-height="1175" - inkscape:window-x="1920" + inkscape:zoom="0.5" + inkscape:cx="692" + inkscape:cy="863" + inkscape:window-width="2256" + inkscape:window-height="1427" + inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="layer1" @@ -43,268 +43,183 @@ fit-margin-right="30" fit-margin-bottom="30" lock-margins="true" - units="px"> + units="px" + inkscape:showpageshadow="2" + inkscape:deskcolor="#d1d1d1" + inkscape:export-bgcolor="#ffffffff"> + originy="-12.964584" + spacingy="1" + spacingx="1" + units="px" + visible="false" /> + id="guide130046" + inkscape:locked="false" /> + id="defs2"> + + + + + width="136.72379" + height="13.304934" + x="-297.37354" + y="285.23993" + ry="0.99500984" /> + width="139.28889" + height="12.58961" + x="-297.3941" + y="268.24722" + ry="0.94422126" /> + width="138.53871" + height="12.591846" + x="-295.26614" + y="313.03033" + ry="0.94438893" /> + width="142.50294" + height="13.292206" + x="-298.30176" + y="239.38693" + ry="0.99704427" /> + width="141.32938" + height="14.086466" + x="-296.96185" + y="329.03442" + ry="1.0564854" /> + width="141.13342" + height="13.295201" + x="-297.81955" + y="224.83447" + ry="0.99713981" /> hyperfine + id="tspan1">hyperfine --warmup 2 --warmup 2 + id="tspan5"> --runs 3 --runs 3 + id="tspan8"> --setup <setup> + id="tspan10"> --setup <setup> --prepare <prepare1> + id="tspan14"> --prepare <prepare1> <command1> --conclude <conclude1> + id="tspan58"> <command1> --prepare <prepare2> + id="tspan61"> <command2> + y="-26.247237" + id="tspan64"> --prepare <prepare2> --conclude <conclude2> --cleanup <cleanup> - - - - command1 - - prepare1 - - command1 - - prepare1 - - command1 - - prepare1 + id="tspan66"> + <command2> + --cleanup <cleanup> 2 warmup runs 3 benchmark runs - - setup - - cleanup - - command1 - - prepare1 - - command1 - - prepare1 + id="tspan73">3 benchmark runs + width="58.173439" + height="84.228279" + x="-95.232544" + y="273.12061" + ry="0.90244579" /> command2 + y="383.04712">command2 prepare2 + x="-87.545547" + y="370.31244">prepare2 command2 + x="-89.140648" + y="342.98831">command2 command2 + x="-89.821892" + y="303.94724">command2 prepare2 + y="287.57556">prepare2 2 warmup runs 3 benchmark runs + id="tspan74">3 benchmark runs setup + x="-80.605759" + y="265.01321">setup command2 + x="-89.962204" + y="418.49924">command2 prepare2 + x="-84.724586" + y="405.82733">prepare2 command2 + x="-88.593201" + y="454.94449">command2 prepare2 + x="-86.138763" + y="441.45667">prepare2 + + conclude2 + conclude2 + conclude2 + conclude2 + conclude2 + + + + command1 + + prepare1 + + command1 + + prepare1 + + command1 + + prepare1 + + setup + + cleanup + + command1 + + prepare1 + + command1 + + prepare1 + conclude1 + conclude1 + conclude1 + conclude1> + conclude1 + + diff --git a/doc/hyperfine.1 b/doc/hyperfine.1 index 862430d..73f8e20 100644 --- a/doc/hyperfine.1 +++ b/doc/hyperfine.1 @@ -16,6 +16,8 @@ hyperfine \- command\-line benchmarking tool .IR CMD ] .RB [ \-\-prepare .IR CMD ] +.RB [ \-\-conclude +.IR CMD ] .RB [ \-\-cleanup .IR CMD ] .RB [ \-\-parameter\-scan @@ -115,11 +117,20 @@ The \fB\-\-prepare\fR option can be specified once for all commands or multiple once for each command. In the latter case, each preparation command will be run prior to the corresponding benchmark command. .HP +.IP +Execute \fICMD\fP after each timing run. This is useful for clearing disk caches, +for example. +The \fB\-\-conclude\fR option can be specified once for all commands or multiple times, +once for each command. In the latter case, each conclusion command will be +run after the corresponding benchmark command. +.HP \fB\-c\fR, \fB\-\-cleanup\fR \fICMD...\fP .IP Execute \fICMD\fP after the completion of all benchmarking runs for each individual command to be benchmarked. This is useful if the commands to be benchmarked -produce artifacts that need to be cleaned up. +produce artifacts that need to be cleaned up. It only runs once a series of +benchmark runs, as opposed to \fB\-\-conclude\fR option which runs after +ever run. .HP \fB\-P\fR, \fB\-\-parameter\-scan\fR \fIVAR\fP \fIMIN\fP \fIMAX\fP .IP @@ -335,12 +346,13 @@ Export the results of a parameter scan benchmark to a markdown table: .fi .RE .LP -Demonstrate when each of \fB\-\-setup\fR, \fB\-\-prepare\fR, \fIcmd\fP and \fB\-\-cleanup\fR will run: +Demonstrate when each of \fB\-\-setup\fR, \fB\-\-prepare\fR, \fB\-\-conclude\fR, \fIcmd\fP and \fB\-\-cleanup\fR will run: .RS .nf \fBhyperfine\fR \fB\-L\fR n 1,2 \fB\-r\fR 2 \fB\-\-show-output\fR \\ \fB\-\-setup\fR 'echo setup n={n}' \\ \fB\-\-prepare\fR 'echo prepare={n}' \\ + \fB\-\-conclude\fR 'echo conclude={n}' \\ \fB\-\-cleanup\fR 'echo cleanup n={n}' \\ 'echo command n={n}' .fi