![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |
Launch files
Messages
Services
Plugins
Recent questions tagged performance_test at Robotics Stack Exchange
![]() |
performance_test package from performance_test repoperformance_report performance_test performance_test_ros1_msgs performance_test_ros1_publisher |
ROS Distro
|
Package Summary
Tags | No category tags. |
Version | 2.3.0 |
License | Apache 2.0 |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://gitlab.com/ApexAI/performance_test.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-05-20 |
Dev Status | MAINTAINED |
CI status | No Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Apex.AI, Inc.
Authors
performance_test
[TOC]
The performance_test tool tests latency and other performance metrics of various middleware implementations that support a pub/sub pattern. It is used to simulate non-functional performance of your application.
The performance_test tool allows you to quickly set up a pub/sub configuration, e.g. number of publisher/subscribers, message size, QOS settings, middleware. The following metrics are automatically recorded when the application is running:
- latency: corresponds to the time a message takes to travel from a publisher to subscriber. The latency is measured by timestamping the sample when it’s published and subtracting the timestamp (from the sample) from the measured time when the sample arrives at the subscriber (only logged when a subscriber is created)
-
CPU usage: percentage of the total system wide CPU usage (logged separately for each instance of
perf_test
) -
resident memory: heap allocations, shared memory segments, stack (used for system’s internal
work) (logged separately for each instance of
perf_test
) - sample statistics: number of samples received, sent, and lost per experiment run.
This master
branch is compatible with the following ROS 2 versions
- rolling
- jazzy
- iron
- humble
- galactic
- foxy
- eloquent
- dashing
- Apex.OS
How to use this document
- Start here for a quick example of building and running the performance_test tool with the Cyclone DDS plugin.
- If needed, find more detailed information about building and running
- Or, if the quick example is good enough, skip ahead to the list of supported middleware plugins to learn how to test a specific middleware implementation.
- Check out the tools for visualizing the results
- If desired, read about the design and architecture of the tool.
Example
This example shows how to test the non-functional performance of the following configuration:
Option | Value |
---|---|
Plugin | Cyclone DDS |
Message type | Array1k |
Publishing rate | 100Hz |
Topic name | test_topic |
Duration of the experiment | 30s |
Number of publisher(s) | 1 (default) |
Number of subscriber(s) | 1 (default) |
-
Install ROS 2
-
Install Cyclone DDS to /opt/cyclonedds
-
Build performance_test with the CMake build flag for Cyclone DDS:
source /opt/ros/rolling/setup.bash
cd ~/perf_test_ws
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=CYCLONEDDS
source ./install/setup.bash
- Run with the communication plugin option for Cyclone DDS:
mkdir experiment
./install/performance_test/lib/performance_test/perf_test --communication CycloneDDS
--msg Array1k
--rate 100
--topic test_topic
--max-runtime 30
--logfile experiment/log.csv
At the end of the experiment, a CSV log file will be generated in the experiment folder with a name
that starts with log
.
Building the performance_test tool
For a simple example, see Dockerfile.rclcpp.
The performance_test tool is structured as a ROS 2 package, so colcon
is used to build it.
Therefore, you must source a ROS 2 installation:
source /opt/ros/rolling/setup.bash
Select a middleware plugin from this list. Then build the performance_test tool with the selected middleware:
```bash mkdir -p ~/perf_test_ws/src
File truncated at 100 lines see the full file
Changelog for package performance_test
X.Y.Z (YYYY/MM/DD)
2.3.0 (2024/09/24)
Removed
- Moved
apex_performance_plotter
to its own package here
2.2.0 (2024/05/15)
Added
- performance_test can be built with ROS 2 Iron and Jazzy
Changed
- Renamed the
--dds-domain_id
CLI arg to--dds-domain-id
- When
--dds-domain-id
is unspecified, fall back to theROS_DOMAIN_ID
environment variable -
--zero-copy
has been separated into two flags:-
--shared-memory
: Enable shared-memory transfer in the plugin. This is meant to replace the need to manually set runtime flags viaCYCLONEDDS_URI
,APEX_MIDDLEWARE_SETTINGS
, etc. -
--loaned-samples
: When publishing messages in the plugin, borrow loaned samples instead of publishing by copy -
--zero-copy
is now an alias for--shared-memory --loaned-samples
- Supported plugins include:
-c CycloneDDS
-c CycloneDDS-CXX
-c ApexOSPollingSubscription
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_cyclonedds_cpp
-
-c rclcpp-*
withRMW_IMPLEMENTATION=rmw_fastrtps_cpp
-
2.1.0 (2024/04/17)
Added
- Add new function
prepare()
to the Publisher and Subscriber API, intended to allow participant discovery without blocking the main threadChanged
- Change the default
--history
arg fromKEEP_ALL
toKEEP_LAST
- Change the default
--history-depth
arg from1000
to16
- If
--expected-num-pubs
is unspecified, set it to the same value as-p
- If
--expected-num-subs
is unspecified, set it to the same value as-s
Fixed
- Removed an unused variable to fix a Clang build
- Remove unused variable names in the
Plugin
abstract class - Fix a potential lockup in PublisherTask on QNX
2.0.0 (2024/03/19)
Added
- Add experimental bazel support
bazel build //performance_test --//:plugin_implementation=//path/to/a/plugin
- Add a rudimentary socket-based plugin for testing the bazel support
-
bazel run //performance_test --//:plugin_implementation=//performance_test/plugins/demo:demo_plugin -- --help
Changed
-
- Instead of enabling/disabling each plugin, you select exactly one
with a CMake string option, for example:
colcon build --cmake-args -DPERFORMANCE_TEST_PLUGIN=ROS2
- Renamed the
--communication
CLI arg to--communicator
. The short-c
is unchanged.Removed
- Removed the deprecated CLI flags for QOS settings:
- Instead of
--reliable
, use--reliability RELIABLE
- Instead of
--transient
, use--durability TRANSIENT_LOCAL
- Instead of
--keep-last
, use--history KEEP_LAST
- Instead of
- Removed the obsolete
BoundedSequenceFlat
messages - Removed the superfluous
--msg-list
CLI flag. The--help
message already lists the available messages.Fixed
- Update the Apex.OS Runner to use
executor_runner::deferred
instead ofexecutor_runner::deferred_tag()
- Ensure that the first few published samples are sent at the expected rate
1.5.2 (YYYY/MM/DD)
Added
-
--prevent-cpu-idle
is available on QNXChanged
- JSON log files will contain all values in the
APEX_PERFORMANCE_TEST
dictionary, instead of the five specific values used previously - Switch to build as C++17 by default
Fixed
- Zero copy transfer is again enabled for the rclcpp publisher
1.5.0 (2023/06/14)
Added
- New CLI switch
--prevent-cpu-idle
(linux only). When specified, perf_test will use/dev/cpu_dma_latency
to request that the CPU not enter any sleep states, to potentially give more consistent results - Some smaller
Array
messages, down to 32 bits - Added support to the FastDDS plugin for bounded and unbounded sequences
Changed
- Update the README to better explain how to use this tool with Apex.OS
- In the
Runner
, allocate theAnalysisResult
s on the stack instead of usingshared_ptr
-
Subscriber
methods accept a callback parameter, instead of returning avector
of results, to reduce heap usage - Refactored the interaction between
SubscriberStats
andAnalysisResult
to remove the need for astd::vector
of latency samples, to reduce heap usage - Adjusted the
Array
message sizes to make the name match the contents - Updated
apex_os_communicator
to use the new zero-copy API
1.4.2 (2023/03/15)
Added
File truncated at 100 lines see the full file
Wiki Tutorials
Package Dependencies
Deps | Name |
---|---|
rclcpp | |
ros_environment | |
ament_cmake | |
rosidl_default_generators | |
rmw_implementation | |
rosidl_default_runtime | |
ament_cmake_gtest | |
ament_lint_auto | |
ament_lint_common |
System Dependencies
Name |
---|
git |
Dependant Packages
Name | Deps |
---|---|
performance_report |