You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1.0 KiB

Benchmarking

On Linux, use the tools/linux_reduced_cpu_variance_run.sh wrapper to reduce CPU variance.

Timedemo:

tools/linux_reduced_cpu_variance_run.sh tools/measure_timedemo_performance.py -n 5 --binary build-rel/devilutionx

Individual benchmarks (built when BUILD_TESTING is ON):

tools/build_and_run_benchmark.py clx_render_benchmark

You can pass arguments to the benchmark binary with --, e.g.:

tools/build_and_run_benchmark.py clx_render_benchmark -- --benchmark_repetitions=5

The tools/build_and_run_benchmark.py script basically does something like this:

{ [ -d build-reld ] || cmake -S. -Bbuild-reld -DCMAKE_BUILD_TYPE=RelWithDebInfo; } && \
cmake --build build-reld --target clx_render_benchmark && \
tools/linux_reduced_cpu_variance_run.sh build-reld/clx_render_benchmark

See tools/build_and_run_benchmark.py --help for more information.

You can also profile your benchmarks.