Skip to content

Add a benchmark example from one of the tests

Javier requested to merge benchmark-example into dev0.3.2

This PR is designed to prototype a benchmark using Criterion.rs. I selected a random test (base_pose_correct()) and ported it over to the new bench/benchmark.rs.

@degv364, maybe select a test that is worth the benchmark?

Also according to Criterion's docs we could invoke an external script -- like the equivalent orocos-kdl on python to the rust benchmark.

Please check it out when you have time.

FYI, the benchmark runs by invoking cargo bench and the output looks something like this:

     Running target/release/deps/benchmarks-4756e26b82be4d43
base_pose               time:   [2.5043 us 2.5169 us 2.5314 us]                       
                        change: [-2.6007% -1.9704% -1.2183%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  4 (4.00%) high mild
  4 (4.00%) high severe
Edited by daniel

Merge request reports