Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support actions / Add communication benchmarks directory #137

Open
wants to merge 9 commits into
base: mauro/iron-events-executor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composition_benchmark/apps/base_publisher_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(int argc, char ** argv)
performance_test::SpinType::SPIN);

system->add_nodes(nodes);
system->spin(MAX_HOURS, false, false);
system->spin(MAX_HOURS, false);

rclcpp::shutdown();
}
2 changes: 1 addition & 1 deletion composition_benchmark/apps/base_subscriber_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char ** argv)
performance_test::SpinType::SPIN);

system->add_nodes(nodes);
system->spin(MAX_HOURS, false, false);
system->spin(MAX_HOURS, false);

rclcpp::shutdown();
}
2 changes: 1 addition & 1 deletion composition_benchmark/apps/composable_pub_sub_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main(int argc, char ** argv)
spin_type);

system->add_nodes(nodes);
system->spin(MAX_HOURS, false, false);
system->spin(MAX_HOURS, false);

rclcpp::shutdown();
}
2 changes: 1 addition & 1 deletion composition_benchmark/apps/multi-producer-node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main(int argc, char ** argv)
performance_test::SpinType::SPIN);

system->add_node(nodes);
system->spin(std::chrono::seconds(20), false, false);
system->spin(std::chrono::seconds(20), false);

ru_logger.stop();

Expand Down
97 changes: 16 additions & 81 deletions irobot_benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,104 +12,39 @@ endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(irobot_events_executor REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
find_package(performance_test REQUIRED)
find_package(performance_test_factory REQUIRED)

add_executable(irobot_benchmark src/irobot_benchmark.cpp)
ament_target_dependencies(irobot_benchmark rclcpp rclcpp_lifecycle performance_test performance_test_factory irobot_events_executor)
ament_target_dependencies(irobot_benchmark rclcpp rclcpp_lifecycle performance_test performance_test_factory)

install(TARGETS
irobot_benchmark
DESTINATION lib/${PROJECT_NAME}
)

set(FT topology/full_topologies)

set(TEST_TOPOLOGY_FILES
${FT}/cedar.json
${FT}/debug_mont_blanc_best_effort.json
${FT}/debug_mont_blanc_reliable.json
${FT}/debug_sierra_nevada_best_effort.json
${FT}/debug_sierra_nevada_fixed_size_best_effort.json
${FT}/debug_sierra_nevada_reliable.json
${FT}/debug_white_mountain_best_effort.json
${FT}/debug_white_mountain_fixed_size_best_effort.json
${FT}/mont_blanc.json
${FT}/sierra_nevada.json
${FT}/sierra_nevada_fixed_size.json
${FT}/sierra_nevada_fixed_size_loaned.json
${FT}/sierra_nevada_loaned.json
${FT}/white_mountain.json
${FT}/white_mountain_fixed_size.json
${FT}/white_mountain_fixed_size_loaned.json
${FT}/white_mountain_loaned.json
set(TOPOLOGY_FILES
topology/sierra_nevada.json
topology/cedar.json
topology/mont_blanc.json
topology/white_mountain.json
topology/debug_sierra_nevada_reliable.json
topology/debug_sierra_nevada_best_effort.json
topology/debug_mont_blanc_reliable.json
topology/debug_mont_blanc_best_effort.json
)

install(FILES
${TEST_TOPOLOGY_FILES}
DESTINATION lib/${PROJECT_NAME}/${FT})

set(SP topology/single_process)

set(TOPOLOGY_FILES_SINGLE_PROCESS
${SP}/pub_sub_loaned_10b.json
${SP}/pub_sub_loaned_100kb.json
${SP}/pub_sub_loaned_1mb.json
${SP}/pub_sub_loaned_4mb.json
${TOPOLOGY_FILES}
DESTINATION lib/${PROJECT_NAME}/topology)

${SP}/pub_sub_10b_ipc_on.json
${SP}/pub_sub_100kb_ipc_on.json
${SP}/pub_sub_1mb_ipc_on.json
${SP}/pub_sub_4mb_ipc_on.json

${SP}/pub_sub_10b_ipc_off.json
${SP}/pub_sub_100kb_ipc_off.json
${SP}/pub_sub_1mb_ipc_off.json
${SP}/pub_sub_4mb_ipc_off.json
# Install the entire comms_benchmark directory, preserving file permissions
install(DIRECTORY comms_benchmark/
DESTINATION lib/${PROJECT_NAME}/comms_benchmark
USE_SOURCE_PERMISSIONS
)

install(FILES
${TOPOLOGY_FILES_SINGLE_PROCESS}
DESTINATION lib/${PROJECT_NAME}/${SP})

set(MP topology/multi_process)

set(TOPOLOGY_FILES_MULTI_PROCESS
${MP}/pub_ipc_off_10b.json
${MP}/pub_ipc_off_100kb.json
${MP}/pub_ipc_off_1mb.json
${MP}/pub_ipc_off_4mb.json

${MP}/sub_ipc_off_10b.json
${MP}/sub_ipc_off_100kb.json
${MP}/sub_ipc_off_1mb.json
${MP}/sub_ipc_off_4mb.json

${MP}/pub_loaned_10b.json
${MP}/pub_loaned_100kb.json
${MP}/pub_loaned_1mb.json
${MP}/pub_loaned_4mb.json

${MP}/sub_loaned_10b.json
${MP}/sub_loaned_100kb.json
${MP}/sub_loaned_1mb.json
${MP}/sub_loaned_4mb.json
)

install(FILES
${TOPOLOGY_FILES_MULTI_PROCESS}
DESTINATION lib/${PROJECT_NAME}/${MP})

set(PROFILES
profiles/ignore_local_endpoints.xml
profiles/shared_memory_fastdds_config.xml)

install(FILES
${PROFILES}
DESTINATION lib/${PROJECT_NAME}/profiles)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Expand Down
36 changes: 36 additions & 0 deletions irobot_benchmark/comms_benchmark/profiles/roudi_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[general]
version = 1

[[segment]]

[[segment.mempool]]
size = 128
count = 10000

[[segment.mempool]]
size = 1024
count = 5000

[[segment.mempool]]
size = 16384
count = 1000

[[segment.mempool]]
size = 131072
count = 200

[[segment.mempool]]
size = 524288
count = 50

[[segment.mempool]]
size = 1048576
count = 30

[[segment.mempool]]
size = 4194304
count = 5

[[segment.mempool]]
size = 5242880
count = 5
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/iceoryx/etc/cyclonedds.xsd">
<Domain id="any">
<SharedMemory>
<Enable>true</Enable>
<LogLevel>info</LogLevel>
</SharedMemory>
</Domain>
</CycloneDDS>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">

<!-- Default publisher profile -->
<data_writer profile_name="default publisher profile" is_default_profile="true">
<qos>
<publishMode>
<kind>ASYNCHRONOUS</kind>
</publishMode>
<data_sharing>
<kind>AUTOMATIC</kind>
</data_sharing>
</qos>
<historyMemoryPolicy>DYNAMIC_REUSABLE</historyMemoryPolicy>
</data_writer>

<data_reader profile_name="default subscription profile" is_default_profile="true">
<qos>
<data_sharing>
<kind>AUTOMATIC</kind>
</data_sharing>
</qos>
<historyMemoryPolicy>DYNAMIC_REUSABLE</historyMemoryPolicy>
</data_reader>

</profiles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">

<!-- Default publisher profile -->
<data_writer profile_name="default_publisher_profile" is_default_profile="true">
<historyMemoryPolicy>PREALLOCATED_WITH_REALLOC</historyMemoryPolicy>
<qos>
<publishMode>
<kind>ASYNCHRONOUS</kind>
</publishMode>
<data_sharing>
<kind>AUTO</kind>
</data_sharing>
</qos>
<topic>
<resourceLimitsQos>
<extra_samples>5</extra_samples>
</resourceLimitsQos>
</topic>
</data_writer>

<!-- Default subscriber profile -->
<data_reader profile_name="default_subscription_profile" is_default_profile="true">
<historyMemoryPolicy>PREALLOCATED_WITH_REALLOC</historyMemoryPolicy>
<qos>
<data_sharing>
<kind>AUTO</kind>
</data_sharing>
</qos>
</data_reader>

</profiles>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">

<!-- Default publisher profile -->
<data_writer profile_name="default publisher profile" is_default_profile="true">
<qos>
<publishMode>
<kind>ASYNCHRONOUS</kind>
</publishMode>
<data_sharing>
<kind>AUTOMATIC</kind>
</data_sharing>
</qos>
<historyMemoryPolicy>PREALLOCATED</historyMemoryPolicy>
</data_writer>

<data_reader profile_name="default subscription profile" is_default_profile="true">
<qos>
<data_sharing>
<kind>AUTOMATIC</kind>
</data_sharing>
</qos>
<historyMemoryPolicy>PREALLOCATED</historyMemoryPolicy>
</data_reader>

</profiles>
Loading
Loading