Skip to content

[10387] Update Performance Throughput Testing to support: data sharing, loans and zero copy #1759

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

Merged
merged 31 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c396ba2
Updating test DataType to make it loan friendly
Jan 27, 2021
eb4b825
Refs #10386: Updated ThroughputPublisher to the new DDS API
Jan 28, 2021
deaf7bb
Use xml to load qos in order to modify them later
Jan 28, 2021
a8eda81
Refs #10386: fix build in gcc. Include order and remove using std in …
JLBuenoLopez Jan 29, 2021
1426311
Refs #10386: remove PSM header from Subscriber
JLBuenoLopez Jan 29, 2021
c78a79e
Refs #10386: partial refactor Subscriber to DDS API
JLBuenoLopez Jan 29, 2021
4178b34
Refs #10386: Upgrading ThroughputSubscriber to new DDS api
Feb 9, 2021
1e36a8e
Command logic modified to account for new static type management
Feb 11, 2021
da148fe
Solving cl building issues
Feb 11, 2021
11b539d
Solving sync issues on Subscriber callbacks
Feb 11, 2021
f6abfcb
Serialized endpoint liveliness in intraprocess
Feb 11, 2021
aded1e6
Disabling data sharing in xmls
Feb 11, 2021
4d79865
linter pass
Feb 11, 2021
4d0e33e
Replacing data endpoint removal sync from a wait based on unmatch to …
Feb 12, 2021
29088fd
Updating the demands file parsing to account for the new Type overhead
Feb 12, 2021
4f0c68e
Update CMakeLists.txt to include data sharing and loans.
Feb 13, 2021
4e54823
Update python script to include data sharing and loans.
Feb 13, 2021
d708ee8
Updated test binary cli to support data sharing and loans
Feb 13, 2021
a224635
Data sharing implementation
Feb 13, 2021
37713b8
Data loans implementation
Feb 13, 2021
597b213
Linter pass
Feb 14, 2021
120379f
Reduce testing memory footprint to avoid linux dockers constrains
Feb 15, 2021
59da480
Fall back to udp discovery in all tests to prevent discovery issues.
Feb 15, 2021
5d627c1
Restrain domain ids below 100 to avoid multicast issues on windows.
Feb 15, 2021
943942a
workaround 'linux pure virtual method called' exception
Feb 15, 2021
4cf377d
Enforce atomic barrier to disable callbacks
Feb 16, 2021
e806dd0
Disabling security settings for non security builds
Feb 16, 2021
5e5a546
Give some room to the DataSharingListener to process all data before …
Feb 16, 2021
5e64b3f
Reset the Data QoS in each Type iteration
Feb 18, 2021
65e3464
Addressing reviewers comments
Feb 20, 2021
142f079
speed up testing on Mac platform
Feb 22, 2021
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
176 changes: 150 additions & 26 deletions test/performance/throughput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,39 @@ set(
interprocess_reliable_shm
)

###########################################################################
# List of tests supporting specific features #
# Each entry in this list means a specific test case added #
###########################################################################

set(
DATA_SHARING_LIST
intraprocess_best_effort
intraprocess_reliable
interprocess_best_effort_shm
interprocess_reliable_shm
)

set(
LOAN_SAMPLES_LIST
intraprocess_best_effort
intraprocess_reliable
interprocess_best_effort_shm
interprocess_reliable_shm
interprocess_best_effort_udp
interprocess_reliable_udp
interprocess_best_effort_tcp
interprocess_reliable_tcp
)

set(
DATA_SHARING_AND_LOAN_SAMPLES_LIST
intraprocess_best_effort
intraprocess_reliable
interprocess_best_effort_shm
interprocess_reliable_shm
)

###########################################################################
# Configure XML files #
###########################################################################
Expand All @@ -71,6 +104,16 @@ find_package(PythonInterp 3 REQUIRED)
if(PYTHONINTERP_FOUND)
# Loop over the test names
foreach(throughput_test_name ${THROUGHPUT_TEST_LIST})

# decide if add security testing
set(ADD_THROUGHPUT_SECURITY OFF)
if(SECURITY AND (${throughput_test_name} MATCHES "^interprocess"))
set(ADD_THROUGHPUT_SECURITY ON)
endif()

# list of all the test cases generated in this iteration
set(test_cases_setup performance.throughput.${throughput_test_name})

# Set the interprocess flag
if(${throughput_test_name} MATCHES "^interprocess")
set(interproces_flag "--interprocess")
Expand All @@ -89,20 +132,6 @@ if(PYTHONINTERP_FOUND)
${interproces_flag}
)

# Set test properties
set_property(
TEST performance.throughput.${throughput_test_name}
PROPERTY LABELS "NoMemoryCheck"
)
set_property(
TEST performance.throughput.${throughput_test_name}
APPEND PROPERTY ENVIRONMENT "THROUGHPUT_TEST_BIN=$<TARGET_FILE:ThroughputTest>"
)
set_property(
TEST performance.throughput.${throughput_test_name}
APPEND PROPERTY ENVIRONMENT "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
)

# Add environment
if(WIN32)
set(WIN_PATH "$ENV{PATH}")
Expand All @@ -121,13 +150,15 @@ if(PYTHONINTERP_FOUND)
endforeach()
endif()
string(REPLACE ";" "\\;" WIN_PATH "${WIN_PATH}")
set_property(TEST performance.throughput.${throughput_test_name} APPEND PROPERTY ENVIRONMENT "PATH=${WIN_PATH}")
endif()

if(SECURITY AND (${throughput_test_name} MATCHES "^interprocess"))
if(ADD_THROUGHPUT_SECURITY)

# Add the secure version
list(APPEND test_cases_setup performance.throughput.${throughput_test_name}.security)

add_test(
NAME performance.throughput.${throughput_test_name}_security
NAME performance.throughput.${throughput_test_name}.security
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
Expand All @@ -137,28 +168,121 @@ if(PYTHONINTERP_FOUND)
${interproces_flag}
)

# Hint certificates location
set_property(
TEST performance.throughput.${throughput_test_name}.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
)

endif()

# Check if a data sharing test is required
if(throughput_test_name IN_LIST DATA_SHARING_LIST)

# append to the list of cases
list(APPEND test_cases_setup performance.throughput.${throughput_test_name}.data_sharing)

add_test(
NAME performance.throughput.${throughput_test_name}.data_sharing
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--data_sharing
${interproces_flag}
)

endif()

# Check if a loans test is required
if(throughput_test_name IN_LIST LOAN_SAMPLES_LIST)

# append to the list of cases
list(APPEND test_cases_setup performance.throughput.${throughput_test_name}.data_loans)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--data_loans
${interproces_flag}
)

if(ADD_THROUGHPUT_SECURITY)

# Add the secure version
list(APPEND test_cases_setup performance.throughput.${throughput_test_name}.data_loans.security)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans.security
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--security
${interproces_flag}
--data_loans
)

# Hint certificates location
set_property(
TEST performance.throughput.${throughput_test_name}.data_loans.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
)

endif()

endif()

# Check if a test using data sharing and loans is required
if(throughput_test_name IN_LIST DATA_SHARING_AND_LOAN_SAMPLES_LIST)

# append to the list of cases
list(APPEND test_cases_setup performance.throughput.${throughput_test_name}.data_loans_and_sharing)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans_and_sharing
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--data_loans
--data_sharing
${interproces_flag}
)

endif()

# populate the properties for each test
foreach(throughput_test_case ${test_cases_setup})

# Set test properties
set_property(
TEST performance.throughput.${throughput_test_name}_security
TEST ${throughput_test_case}
PROPERTY LABELS "NoMemoryCheck"
)
set_property(
TEST performance.throughput.${throughput_test_name}_security
TEST ${throughput_test_case}
APPEND PROPERTY ENVIRONMENT "THROUGHPUT_TEST_BIN=$<TARGET_FILE:ThroughputTest>"
)
set_property(
TEST performance.throughput.${throughput_test_name}_security
TEST ${throughput_test_case}
APPEND PROPERTY ENVIRONMENT "CMAKE_CURRENT_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}"
)

if(WIN32)
set_property(TEST performance.throughput.${throughput_test_name}_security APPEND PROPERTY ENVIRONMENT "PATH=${WIN_PATH}")
set_property(
TEST ${throughput_test_case}
APPEND PROPERTY ENVIRONMENT "PATH=${WIN_PATH}")
endif()

set_property(
TEST performance.throughput.${throughput_test_name}_security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
)
endif()
endforeach(throughput_test_case)

endforeach(throughput_test_name)
endif()
Loading