Add benchmark tests
This PR adds benchmarks that measure how quickly different types of entities are handled. This would be useful for testing performance improvements.
The benchmark tests are skipped unless AMENT_RUN_PERFORMANCE_TESTS is set, which is the same behavior as as ament_add_google_benchmark_test.
WIP because this needs a new rosdep key python3-pytest-benchmark for https://pypi.org/project/pytest-benchmark/
Requires https://github.com/ros/rosdistro/pull/33918
Do we have any plan to integrate this kind of benchmark in CI/CD so that it can detect the performance degression?
There are benchmark jobs run for each release on build.ros2.org. Here's the one for Rolling https://build.ros2.org/view/Rci/job/Rci__benchmark_ubuntu_jammy_amd64/ . It looks like it runs nightly, but I think it wouldn't show an issue until the package got released, and I don't think there's an automatic comparison with past jobs.
@ros-pull-request-builder retest this please
CI (build: --packages-up-to rclpy test: --packages-select rclpy)
And one with the benchmark tests enabled (build: -DAMENT_RUN_PERFORMANCE_TESTS=ON --packages-up-to rclpy test: --packages-select rclpy)
CI LGTM!