-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add benchmark tests #973
base: rolling
Are you sure you want to change the base?
Add benchmark tests #973
Conversation
60cbd2c
to
1527a9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
benchmark test would be really useful. 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 |
@ros-pull-request-builder retest this please |
Benchmark tests one more time with ros2/ci#674 |
CI LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment and a question. Otherwise, LGTM
rclpy/CMakeLists.txt
Outdated
APPEND_ENV AMENT_PREFIX_PATH=${ament_index_build_path} | ||
PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} | ||
TIMEOUT 120 | ||
WERROR ON | ||
) | ||
# Skip benchmark tests by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment looks like it's in the wrong place. Maybe at L209?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved comment to correct spot in 5a0f651
executor.spin_until_future_complete(result_fut) | ||
assert GoalStatus.STATUS_SUCCEEDED == result_fut.result().status | ||
|
||
benchmark(bm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the other tests we are asserting the result of benchmark
, should we do that here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the assertions now I don't think they were adding value. I removed them in 76fd188
executor.spin_until_future_complete(fut) | ||
assert fut.result() # Raises if there was an error | ||
|
||
benchmark(bm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, should we assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed assertions in 76fd188
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
1527a9e
to
76fd188
Compare
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 asament_add_google_benchmark_test
.WIP because this needs a new rosdep key
python3-pytest-benchmark
for https://pypi.org/project/pytest-benchmark/Requires ros/rosdistro#33918