Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 1.61 KB

commandlineoptions.md

File metadata and controls

58 lines (42 loc) · 1.61 KB

How to filter benchmarking items

Sometimes limited set of functions need to be benchmarked per run (for example, if you are tuning one function, you do not need to measure all functions in benchmark per run, just the one you are interested in). It is possible to set filter by benchmark name:

This example shows how to run all functions wich name contains MyFunction substring:

./my_benchmark.exe --filter=.*MyFunction.*

Filter regular expression format corresponds to basic case of std::regex.

Change output format

sltbench output format may be changed with --reporter option:

./my_benchmark.exe --reporter=json

Supported values:

  • console - (default) prints output as human-readable table of results
  • json - prints output in json format
  • csv - prints output in csv format

Heatup

Benchmark "heatups" OS and hardware before timing. This process takes about 5 seconds (may be less). If you do not want to wait, just add a --heatup off command line option to your benchmark. Be careful, disabling heatup may lead to unstable results for the first test cases.

# Skip heatup stage, run tests ASAP.
# May lead to unstable first test cases.
./my_benchmark.exe --heatup off

List registered benchmarks and its arguments

Use --list option to enumerate registered benchmarks with its arguments line-by-line and quit. Benchmarking is not performed with --list option.

Example:

$ ./my_benchmark.exe --list
function_x/x_arg1
function_x/x_arg2
function_x/x_arg3
function_y
function_z/z_arg1
function_z/z_arg2