Skip to content
Myr

Use C++ compiler drivers in parameter-list examples (#936)

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

authored by David Peter · committed by GitHub · parent 62cfbf0 · Browse files · 4 files+6 added−6 removed
This commit

State

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

Diff stats

4 files+6 added−6 removed

  • other:+6 added−6 removed

4 files+6 added−6 removed

modified:doc/hyperfine.1+2 added-2 removed
182 unmodified lines
183.IP184.RS185Example:186.RS187\fBhyperfine\fR \fB\-L\fR compiler gcc,clang '{compiler} \-O2 main.cpp'187\fBhyperfine\fR \fB\-L\fR compiler g++,clang++ '{compiler} \-O2 main.cpp'188.RE189.RE190.IP191This performs benchmarks for 'gcc \-O2 main.cpp' and 'clang \-O2 main.cpp'.191This performs benchmarks for 'g++ \-O2 main.cpp' and 'clang++ \-O2 main.cpp'.192.IP193The option can be specified multiple times to run benchmarks for all194possible parameter combinations.195.HP
176 unmodified lines
modified:src/cli.rs+2 added-2 removed
192 unmodified lines
193 .conflicts_with_all(["parameter-scan", "parameter-step-size"])194 .help(195 "Perform benchmark runs for each value in the comma-separated list VALUES. \196 Replaces the string '{VAR}' in each command by the current parameter value\197 .\n\nExample: hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'\n\n\198 This performs benchmarks for 'gcc -O2 main.cpp' and 'clang -O2 main.cpp'.\n\n\197 .\n\nExample: hyperfine -L compiler g++,clang++ '{compiler} -O2 main.cpp'\n\n\198 This performs benchmarks for 'g++ -O2 main.cpp' and 'clang++ -O2 main.cpp'.\n\n\199 The option can be specified multiple times to run benchmarks for all \200 possible parameter combinations.\n"201 ),202 )
212 unmodified lines
modified:CHANGELOG.md+1 added-1 removed
245 unmodified lines
246 This is similar to `--parameter-scan <VAR> <MIN> <MAX>`, but doesn't247 necessarily require numeric arguments.248249 ``` bash250 hyperfine --parameter-list compiler "gcc,clang" \250 hyperfine --parameter-list compiler "g++,clang++" \251 "{compiler} -O2 main.cpp"252 ```253254 See: #227, #234 (@JuanPotato)
168 unmodified lines
modified:README.md+1 added-1 removed
82 unmodified lines
8384For non-numeric parameters, you can also supply a list of values with the `-L`/`--parameter-list`85option:86```87hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'87hyperfine -L compiler g++,clang++ '{compiler} -O2 main.cpp'88```8990### Intermediate shell91
253 unmodified lines