Firstly, you need to create a virtual environment, activate it, and install opengen using
pip install .
from within python.
To run the benchmarks, you need to install:
pip install pytest-benchmark[histogram]
Then, firstly, create some necessary optimizers to be benchmarked
python prepare_benchmarks.py
Run this from within python/.
This will create a number of solvers to be benchmarked;
these will be stored in python/.python_test_build/benchmarkable.
Then benchmark them with
py.test test/benchmark_open.py --benchmark-warmup-iterations=20
To generate a fancy histogram (box plots) run
py.test test/benchmark_open.py --benchmark-warmup-iterations=20 --benchmark-histogram=out
# to convert the SVG file to PNG:
qlmanage -t -s 1000 -o . out.svg
The generated benchmark looks like this:
Run
python -W ignore test/test_constraints.py -v
python -W ignore test/test_ros2.py -v
python -W ignore test/test.py -v
