Skip to content

<2.2.x> Explicitly set reliability [10777] #1810

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 1 commit into from
Apr 23, 2021
Merged
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
21 changes: 17 additions & 4 deletions test/performance/latency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ if(PYTHONINTERP_FOUND)
foreach(latency_test_name ${LATENCY_TEST_LIST})

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

# list of all the test cases generated in this iteration
Expand All @@ -120,6 +120,13 @@ if(PYTHONINTERP_FOUND)
set(interproces_flag "")
endif()

# Set the reliability flag
if(${latency_test_name} MATCHES "reliable")
set(reliability_flag "--reliability")
else()
set(reliability_flag "")
endif()

# Add the test
add_test(
NAME performance.latency.${latency_test_name}
Expand All @@ -129,6 +136,7 @@ if(PYTHONINTERP_FOUND)
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
${interproces_flag}
${reliability_flag}
)

# Add environment
Expand Down Expand Up @@ -166,9 +174,10 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--security
${interproces_flag}
${reliability_flag}
)

# Hint certificates location
# Hint certificates location
set_property(
TEST performance.latency.${latency_test_name}.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
Expand All @@ -191,6 +200,7 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
${interproces_flag}
--data_sharing
${reliability_flag}
)

endif()
Expand All @@ -210,6 +220,7 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
${interproces_flag}
--data_loans
${reliability_flag}
)

# If there is security, add a secure test as well with loans
Expand All @@ -228,9 +239,10 @@ if(PYTHONINTERP_FOUND)
--security
${interproces_flag}
--data_loans
${reliability_flag}
)

# Hint certificates location
# Hint certificates location
set_property(
TEST performance.latency.${latency_test_name}.data_loans.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
Expand All @@ -256,6 +268,7 @@ if(PYTHONINTERP_FOUND)
${interproces_flag}
--data_loans
--data_sharing
${reliability_flag}
)

endif()
Expand Down
26 changes: 21 additions & 5 deletions test/performance/latency/latency_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
help='Enable the use of the loan sample API (Defaults: disable)',
required=False,
)
parser.add_argument(
'-r',
'--reliability',
action='store_true',
help='Run with RELIABLE reliability (Defaults: disable)',
required=False,
)

# Parse arguments
args = parser.parse_args()
Expand Down Expand Up @@ -119,20 +126,26 @@
# Data sharing and loans options
# modify output file names
if args.data_sharing and args.data_loans:
filename_options += '_data_loans_and_sharing'
filename_options += '_data_loans_and_sharing'
elif args.data_sharing:
filename_options += '_data_sharing'
filename_options += '_data_sharing'
elif args.data_loans:
filename_options += '_data_loans'
filename_options += '_data_loans'

# add flags to the command line
data_options = []

if args.data_sharing:
data_options += [ '--data_sharing' ]
data_options += ['--data_sharing']

if args.data_loans:
data_options += [ '--data_loans' ]
data_options += ['--data_loans']

reliability_options = []
if args.reliability:
reliability_options = ['--reliability=reliable']
else:
reliability_options = ['--reliability=besteffort']

# Environment variables
executable = os.environ.get('LATENCY_TEST_BIN')
Expand Down Expand Up @@ -199,11 +212,13 @@
pub_command += xml_options
pub_command += demands_options
pub_command += data_options
pub_command += reliability_options

sub_command += domain_options
sub_command += xml_options
sub_command += demands_options
sub_command += data_options
sub_command += reliability_options

print('Publisher command: {}'.format(
' '.join(element for element in pub_command)),
Expand Down Expand Up @@ -254,6 +269,7 @@
command += xml_options
command += demands_options
command += data_options
command += reliability_options

print('Executable command: {}'.format(
' '.join(element for element in command)),
Expand Down
21 changes: 17 additions & 4 deletions test/performance/throughput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ if(PYTHONINTERP_FOUND)
foreach(throughput_test_name ${THROUGHPUT_TEST_LIST})

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

# list of all the test cases generated in this iteration
Expand All @@ -121,6 +121,13 @@ if(PYTHONINTERP_FOUND)
set(interproces_flag "")
endif()

# Set the reliability flag
if(${throughput_test_name} MATCHES "reliable")
set(reliability_flag "--reliability")
else()
set(reliability_flag "")
endif()

# Add the test
add_test(
NAME performance.throughput.${throughput_test_name}
Expand All @@ -130,6 +137,7 @@ if(PYTHONINTERP_FOUND)
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
${interproces_flag}
${reliability_flag}
)

# Add environment
Expand Down Expand Up @@ -166,9 +174,10 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--security
${interproces_flag}
${reliability_flag}
)

# Hint certificates location
# Hint certificates location
set_property(
TEST performance.throughput.${throughput_test_name}.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
Expand All @@ -191,6 +200,7 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--data_sharing
${interproces_flag}
${reliability_flag}
)

endif()
Expand All @@ -210,6 +220,7 @@ if(PYTHONINTERP_FOUND)
--demands_file ${CMAKE_CURRENT_SOURCE_DIR}/payloads_demands.csv
--data_loans
${interproces_flag}
${reliability_flag}
)

if(ADD_THROUGHPUT_SECURITY)
Expand All @@ -227,9 +238,10 @@ if(PYTHONINTERP_FOUND)
--security
${interproces_flag}
--data_loans
${reliability_flag}
)

# Hint certificates location
# Hint certificates location
set_property(
TEST performance.throughput.${throughput_test_name}.data_loans.security
APPEND PROPERTY ENVIRONMENT "CERTS_PATH=${PROJECT_SOURCE_DIR}/test/certs"
Expand All @@ -255,6 +267,7 @@ if(PYTHONINTERP_FOUND)
--data_loans
--data_sharing
${interproces_flag}
${reliability_flag}
)

endif()
Expand Down
26 changes: 21 additions & 5 deletions test/performance/throughput/throughput_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@
help='Enable the use of the loan sample API (Defaults: disable)',
required=False,
)
parser.add_argument(
'-R',
'--reliability',
action='store_true',
help='Run with RELIABLE reliability (Defaults: disable)',
required=False,
)

# Parse arguments
args = parser.parse_args()
Expand Down Expand Up @@ -115,11 +122,11 @@
# Data sharing and loans options
# modify output file names
if args.data_sharing and args.data_loans:
filename_options += '_data_loans_and_sharing'
filename_options += '_data_loans_and_sharing'
elif args.data_sharing:
filename_options += '_data_sharing'
filename_options += '_data_sharing'
elif args.data_loans:
filename_options += '_data_loans'
filename_options += '_data_loans'

# Demands files options
demands_options = []
Expand All @@ -137,10 +144,16 @@
data_options = []

if args.data_sharing:
data_options += [ '--data_sharing' ]
data_options += ['--data_sharing']

if args.data_loans:
data_options += [ '--data_loans' ]
data_options += ['--data_loans']

reliability_options = []
if args.reliability:
reliability_options = ['--reliability=reliable']
else:
reliability_options = ['--reliability=besteffort']

# Recoveries files options
recoveries_options = []
Expand Down Expand Up @@ -224,10 +237,12 @@
pub_command += domain_options
pub_command += xml_options
pub_command += data_options
pub_command += reliability_options

sub_command += domain_options
sub_command += xml_options
sub_command += data_options
sub_command += reliability_options

print('Publisher command: {}'.format(
' '.join(element for element in pub_command)),
Expand Down Expand Up @@ -279,6 +294,7 @@
command += domain_options
command += xml_options
command += data_options
command += reliability_options

print('Executable command: {}'.format(
' '.join(element for element in command)),
Expand Down