This page contains the results of the performance comparison between the
different API implementations.
The following tests have been performed by executing 2 RTI Perftest applications,
Publisher and Subscriber, between two nodes, connected to a switch via Ethernet.
The communication has been restricted to a single interface and the transport
has been set to UDPv4.
Find information about the hardware, network, and command-line parameters after
each of the tests.
The graph below shows the one-way latency without load between a Publisher and a Subscriber running
in two Linux nodes in a 10Gbps network. The numbers are for
best-effort as well as strict reliable reliability scenarios.
Note
We use the median (50th percentile) instead of the average in order to get a more stable measurement
that does not account for spurious outliers. We also calculate the average value and other percentile
values, which can be seen in the Detailed Statistics section below.
#!/bin/bashfilename=$0script_location=$(cd"$(dirname"$filename")"||exit255;pwd)exportdatasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"exportdatasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760"exportdomain="2"exportexec_time=20exportnum_reps=1exportinstance_number=100000exportcore=0# We will use some colors to improve visibility of errors and info messages.RED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[0;33m'BLUE='\033[0;34m'LIGHTBLUE='\033[0;36m'NC='\033[0m'INFO_TAG="${GREEN}[INFO]:${NC}"WARNING_TAG="${YELLOW}[WARNING]:${NC}"ERROR_TAG="${RED}[ERROR]:${NC}"exportip_machine_1="10.2.78.20"exportip_machine_2="10.2.78.21"exportif10Gbps="enp1s0f0"exportif1Gbps="eno1"################################################################################functiondisable_colors(){exportRED=""exportGREEN=""exportYELLOW=""exportNC=""exportBLUE=""exportLIGHTBLUE=""exportINFO_TAG="${GREEN}[INFO]:${NC}"exportWARNING_TAG="${YELLOW}[WARNING]:${NC}"exportERROR_TAG="${RED}[ERROR]:${NC}"}functionchange_domain(){if[["$domain"=="1"]];thenexportdomain="2"elseexportdomain="1"fi}# Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize>functionexecute_test(){localkeyed_unkeyed=$1localrel_be=$2localdatasizes_test=$3localother_args=$4localname_suffix=$5localcommands_string_test=$commands_stringlocaltag=""if[["${keyed_unkeyed}"=="keyed"]];thencommands_string_test="${commands_string_test} -keyed -instances $instance_number"tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|"elsetag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|"fiif[["${rel_be}"=="be"]];thencommands_string_test="${commands_string_test} -bestEffort"tag="${tag}${YELLOW}BE${NC}]"elsetag="${tag}${RED}REL${NC}]"fitag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]"localoutput_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv
if[["$role"=="pub"]];thenecho-e"${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}"fiif[["$NO_TASKSET"==""]];thenif[["$LANGUAGE"!="java"&&"$LANGUAGE"!="cs"]];thenexportpre_command_string="taskset -c $core"fifiif[["$LANGUAGE"=="python"]];thenexportpre_command_string="python3 "fiif[["$DOCKER"=="1"]];thenexportpre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR "executable=""fi# Get the aprox time this will take:total_tests=$((`wc-w<<<"$datasizes_test"`*num_reps))total_time=$((total_tests*exec_time))touch$output_filelocalno_headers=""localcurrent_test=0forindexin$(seq1${num_reps});doforDATALENin${datasizes_test};docurrent_test=$((current_test+1))exportcommand="$pre_command_string$executable -domain $domain -dataLen $DATALEN$commands_string_test$other_args$no_headers"if[["$role"=="pub"]];thenecho-e"Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"echo-e${BLUE}$command${NC}elseecho-e${LIGHTBLUE}$command${NC}fiif[["$LANGUAGE"=="cs"&&"$role"=="pub"]];thensleep3fiif[["$raw"=="1"&&"$role"=="sub"]];thensleep5fiif[["${get_netstat_info}"=="1"]];thenecho-e"${INFO_TAG} Getting netstat info before"netstat-s-u|grep-e"error"-e"packet">$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt
fieval$command>>$output_file;if[["${get_netstat_info}"=="1"]];thenecho-e"${INFO_TAG} Getting netstat info after"netstat-s-u|grep-e"error"-e"packet">$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt
touch"$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"python3$script_location/../../../tools/diff_netstat_output.py\-n$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt\-o$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt\-d$DATALEN$no_header_netstat\-csv>>"$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"rm-rf$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt
no_header_netstat=" -nh"fino_headers=" -noOutputHeaders"change_domain
donedone}################################################################################# PARSE COMMAND LINE OPTIONS:while["$1"!=""];docase$1in--executable)executable=$2shift;;--docker)DOCKER="1";;--output-folder)output_folder=$2shift;;--sub-folder)sub_folder=$2shift;;--role)exportrole=$2shift;;--core)exportcore=$2shift;;--test-kind)exportlat_thr=$2shift;;--interface1)exportinterface=$2shift;;--interface2)exportinterface2=$2shift;;--ip1)exportip1=$2shift;;--ip2)exportip2=$2shift;;--repetitions)exportnum_reps=$2shift;;--domain)exportdomain=$2shift;;--execution-time)exportexec_time=$2shift;;--transport)exporttransport=$2shift;;--datalen)exportdatalen_input=$2shift;;--file-suffix)exportfile_suffix=$2shift;;--executable-suffix)exportexecutable_suffix=$2shift;;--extra-arguments)exportextra_arguments=$2shift;;--extra-arguments-pub)exportextra_arguments_pub=$2shift;;--extra-arguments-sub)exportextra_arguments_sub=$2shift;;--skip-no-batching)exportskip_no_batching="1";;--skip-be)exportskip_be_tests="1";;--skip-rel)exportskip_rel_tests="1";;--skip-keyed)exportskip_keyed_data="1";;--skip-large-data)exportskip_large_data="1";;--large-data)exportlarge_data="1";;--keyed)exportskip_unkeyed="1";;--unkeyed)exportskip_keyed_data="1";;--no-batching|--skip-batching)exportno_batching_only="1";;--reliable)exportskip_be_tests="1";;--best-effort)exportskip_rel_tests="1";;--security)exportsecurity_only="$2"shift;;--micro)exportmicro="1";;--cert)exportcert="1";;--raw|--raw-transport)exportraw="1";;--tss)exporttss="1";;--no-colors)exportNO_COLORS="1";;--language)exportLANGUAGE=$2shift;;--loss-rate)exportloss_rate=$2shift;;--get-netstat-info|--netstat)exportget_netstat_info="1";;--no-taskset)exportNO_TASKSET="1";;--ci)exportCI="1";;*)echo-e"unknown parameter \"$1\""exit255;;esacshiftdoneif[["$NO_COLORS"=="1"]];thendisable_colors
fiexportfolder_base="$(dirname"${executable}")"/../../..
if[[$LANGUAGE=="java"||"$LANGUAGE"=="cs"]];thenexportfolder_base="$(dirname"${executable}")"/../..
fiif[[$tss=="1"]];thenexportfolder_base="$(dirname"${executable}")"/../../../../..
fiif[["${executable_suffix}"!=""]];thenexportexecutable="${executable}${executable_suffix}"fiif[["${sub_folder}"!=""]];thenexportoutput_folder="${output_folder}/${sub_folder}"fiecho-e"${INFO_TAG} Perftest executable is: $executable"echo-e"${INFO_TAG} Output folder is: $output_folder"################################################################################if[["$LANGUAGE"=="python"]];thenexportskip_keyed_data="1"exportskip_large_data="1"exportskip_be_tests="1"exportskip_no_batching="1"fiif[["${skip_large_data}"=="1"]];thenexportdatasizes_extended=${datasizes}elif[["${large_data}"=="1"]];thenexportdatasizes=${datasizes_extended}fiif[["${datalen_input}"!=""]];thenecho-e"${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"exportdatasizes=${datalen_input}exportdatasizes_extended=${datalen_input}if[["${no_batching_only}"!="1"]];thenexportskip_large_data="1"fielseif[["${CI}"!=""]];thenecho-e"${YELLOW}[TEST] Testing CI datasizes ${NC}"exportdatasizes="32 128 512 1024 8192 63000"exportdatasizes_extended="${datasizes} 100000 1048576 10485760"fifiif[["$role"!="pub"&&"$role"!="sub"]];thenecho-e"${ERROR_TAG} It must be either publisher or subscriber"exit255fiif[["$lat_thr"!="thr"&&"$lat_thr"!="lat"]];thenecho-e"${ERROR_TAG} It must be either lat or thr"exit255fiif[["${interface}"==""]];thenecho"Using default nics"exportnic_publisher=${ip_machine_1}exportnic_subscriber=${ip_machine_2}elif[["${interface}"=="both"]];thenexportnic_publisher="enp1s0f0,eno1"exportnic_subscriber="enp1s0f0,eno1"echo-e"${INFO_TAG} Using nic_publisher: ${nic_publisher}"echo-e"${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"elseexportnic_publisher=$interfaceecho-e"${INFO_TAG} Using nic_publisher: ${nic_publisher}"if[["${interface2}"==""]];thenexportnic_subscriber=$interfaceelseexportnic_subscriber=$interface2fiecho-e"${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"if[["${ip1}"!=""]];thenexportip_publisher=$ip1echo"Using ip_publisher: ${ip_publisher}"fiif[["${ip2}"!=""]];thenexportip_subscriber=$ip2echo"Using ip_subscriber: ${ip_subscriber}"fifiexporttransport_string="-transport $transport"if[["$transport"=="UDPv4"]];thenexporttransport_string_pub="$transport_string -nic $nic_publisher"exporttransport_string_sub="$transport_string -nic $nic_subscriber"if[["$micro"=="1"||"$raw"=="1"||"$cert"=="1"]];thenexporttransport_string_pub="$transport_string_pub -peer ${ip_subscriber}"exporttransport_string_sub="$transport_string_sub -peer ${ip_publisher}"fielif[["$transport"=="TCP"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400"elif[["$transport"=="TLS"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400"elif[["$transport"=="UDPv4_WAN"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400"elseexporttransport_string_pub="$transport_string"exporttransport_string_sub="$transport_string"fi################################################################################exportpub_string="-pub \${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time"if[[${lat_thr}=="lat"]];thenexportpub_string="$pub_string \ -latencyTest"fiexportsub_string="-sub \${transport_string_sub} \ -noPrintIntervals"if[["$role"=="pub"]];thenecho-e"$INFO_TAG Publisher side running"exportcommands_string=${pub_string}exportextra_arguments="${extra_arguments}${extra_arguments_pub}"elseecho-e"$INFO_TAG Subscriber side running"exportcommands_string=${sub_string}exportextra_arguments="${extra_arguments}${extra_arguments_sub}"fi###############################################################################echo-e"${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
sudo/set_${lat_thr}_mode.sh
sleep5echo-e"${INFO_TAG} Disabling any loss rate"
sudotcqdiscadddev$nic_publisherrootnetemloss0%
sudotcqdiscdeldev$nic_publisherrootnetemloss0%
if[["$role"=="pub"&&"${loss_rate}"!=""]];thenecho-e"${INFO_TAG} Setting loss rate to ${loss_rate}%"sudotcqdiscadddev$nic_publisherrootnetemloss$loss_rate%
ficd$folder_baseecho-e"${INFO_TAG} Folder Base is: $PWD"
mkdir-p$output_folder# Tests that may use batching (when doing throughput tests)if[[${no_batching_only}!="1"]];then# UNKEYEDif[["${skip_unkeyed}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"unkeyed""rel""${datasizes_extended}""${extra_arguments}""$file_suffix"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"unkeyed""be""${datasizes}""${extra_arguments}""$file_suffix"fifi# KEYEDif[["${skip_keyed_data}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"keyed""rel""${datasizes}""${extra_arguments}""$file_suffix"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"keyed""be""${datasizes}""${extra_arguments}""$file_suffix"fififiif[["${skip_no_batching}"==""||"${no_batching_only}"=="1"]];thenno_batching_tests="1"fi# Tests that will not use batchingif[["${lat_thr}"=="thr"&&"${no_batching_tests}"=="1"]];thenif[["$role"=="pub"]];thenexportcommands_string="${commands_string} -batchSize 0"fi# UNKEYEDif[["${skip_unkeyed}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"unkeyed""rel""${datasizes}""${extra_arguments}""_noBatch${file_suffix}"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"unkeyed""be""${datasizes}""${extra_arguments}""_noBatch${file_suffix}"fififiif[["$role"=="pub"&&"${loss_rate}"!=""]];thenecho-e"${INFO_TAG} Disabling loss rate"sudotcqdiscdeldev$nic_publisherrootnetemloss$loss_rate%
fi
The graph below shows the expected throughput behavior when performing a 1-1 communication
between two Linux nodes in a 10Gbps network. The numbers are for
best-effort as well as strict reliable reliability scenarios.
Note
By default, RTI Perftest enables batching when performing a Maximum Throughput test.
The batching feature allows sending more than one data sample per RTPS packet, improving
network performance for small data sizes. See the RTI Connext Core Libraries User’s Manual
for more information on batching.
The batch maximum size is set by RTI Perftest to be 8192 bytes;
after 8192 bytes, batching is not enabled.
#!/bin/bashfilename=$0script_location=$(cd"$(dirname"$filename")"||exit255;pwd)exportdatasizes="32 64 128 256 512 1024 2048 4096 8192 16384 32768 63000"exportdatasizes_extended="${datasizes} 100000 500000 1048576 1548576 4194304 10485760"exportdomain="2"exportexec_time=20exportnum_reps=1exportinstance_number=100000exportcore=0# We will use some colors to improve visibility of errors and info messages.RED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[0;33m'BLUE='\033[0;34m'LIGHTBLUE='\033[0;36m'NC='\033[0m'INFO_TAG="${GREEN}[INFO]:${NC}"WARNING_TAG="${YELLOW}[WARNING]:${NC}"ERROR_TAG="${RED}[ERROR]:${NC}"exportip_machine_1="10.2.78.20"exportip_machine_2="10.2.78.21"exportif10Gbps="enp1s0f0"exportif1Gbps="eno1"################################################################################functiondisable_colors(){exportRED=""exportGREEN=""exportYELLOW=""exportNC=""exportBLUE=""exportLIGHTBLUE=""exportINFO_TAG="${GREEN}[INFO]:${NC}"exportWARNING_TAG="${YELLOW}[WARNING]:${NC}"exportERROR_TAG="${RED}[ERROR]:${NC}"}functionchange_domain(){if[["$domain"=="1"]];thenexportdomain="2"elseexportdomain="1"fi}# Usage: execute_test <keyed/unkeyed> <rel/be> <datasizes> <batchSize>functionexecute_test(){localkeyed_unkeyed=$1localrel_be=$2localdatasizes_test=$3localother_args=$4localname_suffix=$5localcommands_string_test=$commands_stringlocaltag=""if[["${keyed_unkeyed}"=="keyed"]];thencommands_string_test="${commands_string_test} -keyed -instances $instance_number"tag="[${YELLOW}${transport}${NC}|${BLUE}K${NC}|"elsetag="[${YELLOW}${transport}${NC}|${LIGHTBLUE}UK${NC}|"fiif[["${rel_be}"=="be"]];thencommands_string_test="${commands_string_test} -bestEffort"tag="${tag}${YELLOW}BE${NC}]"elsetag="${tag}${RED}REL${NC}]"fitag="${tag}[${LIGHTBLUE}${lat_thr}${NC}]"localoutput_file=$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}.csv
if[["$role"=="pub"]];thenecho-e"${YELLOW}[TEST]: $keyed_unkeyed, $rel_be. ${NC}"fiif[["$NO_TASKSET"==""]];thenif[["$LANGUAGE"!="java"&&"$LANGUAGE"!="cs"]];thenexportpre_command_string="taskset -c $core"fifiif[["$LANGUAGE"=="python"]];thenexportpre_command_string="python3 "fiif[["$DOCKER"=="1"]];thenexportpre_command_string="taskset -c $core docker run --net=host -v /home/perfuser/rti_license_connextpro.dat:/opt/rti.com/rti_connext_dds-7.3.0/rti_license.dat rticom/perftest:7.3.0-EAR "executable=""fi# Get the aprox time this will take:total_tests=$((`wc-w<<<"$datasizes_test"`*num_reps))total_time=$((total_tests*exec_time))touch$output_filelocalno_headers=""localcurrent_test=0forindexin$(seq1${num_reps});doforDATALENin${datasizes_test};docurrent_test=$((current_test+1))exportcommand="$pre_command_string$executable -domain $domain -dataLen $DATALEN$commands_string_test$other_args$no_headers"if[["$role"=="pub"]];thenecho-e"Test ${tag} (${current_test}/${total_tests}) -- Total time = ${total_time}s"echo-e${BLUE}$command${NC}elseecho-e${LIGHTBLUE}$command${NC}fiif[["$LANGUAGE"=="cs"&&"$role"=="pub"]];thensleep3fiif[["$raw"=="1"&&"$role"=="sub"]];thensleep5fiif[["${get_netstat_info}"=="1"]];thenecho-e"${INFO_TAG} Getting netstat info before"netstat-s-u|grep-e"error"-e"packet">$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt
fieval$command>>$output_file;if[["${get_netstat_info}"=="1"]];thenecho-e"${INFO_TAG} Getting netstat info after"netstat-s-u|grep-e"error"-e"packet">$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt
touch"$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"python3$script_location/../../../tools/diff_netstat_output.py\-n$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_after.txt\-o$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_before.txt\-d$DATALEN$no_header_netstat\-csv>>"$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat.csv"rm-rf$output_folder/${lat_thr}_${role}_${keyed_unkeyed}_${rel_be}${name_suffix}_netstat_*.txt
no_header_netstat=" -nh"fino_headers=" -noOutputHeaders"change_domain
donedone}################################################################################# PARSE COMMAND LINE OPTIONS:while["$1"!=""];docase$1in--executable)executable=$2shift;;--docker)DOCKER="1";;--output-folder)output_folder=$2shift;;--sub-folder)sub_folder=$2shift;;--role)exportrole=$2shift;;--core)exportcore=$2shift;;--test-kind)exportlat_thr=$2shift;;--interface1)exportinterface=$2shift;;--interface2)exportinterface2=$2shift;;--ip1)exportip1=$2shift;;--ip2)exportip2=$2shift;;--repetitions)exportnum_reps=$2shift;;--domain)exportdomain=$2shift;;--execution-time)exportexec_time=$2shift;;--transport)exporttransport=$2shift;;--datalen)exportdatalen_input=$2shift;;--file-suffix)exportfile_suffix=$2shift;;--executable-suffix)exportexecutable_suffix=$2shift;;--extra-arguments)exportextra_arguments=$2shift;;--extra-arguments-pub)exportextra_arguments_pub=$2shift;;--extra-arguments-sub)exportextra_arguments_sub=$2shift;;--skip-no-batching)exportskip_no_batching="1";;--skip-be)exportskip_be_tests="1";;--skip-rel)exportskip_rel_tests="1";;--skip-keyed)exportskip_keyed_data="1";;--skip-large-data)exportskip_large_data="1";;--large-data)exportlarge_data="1";;--keyed)exportskip_unkeyed="1";;--unkeyed)exportskip_keyed_data="1";;--no-batching|--skip-batching)exportno_batching_only="1";;--reliable)exportskip_be_tests="1";;--best-effort)exportskip_rel_tests="1";;--security)exportsecurity_only="$2"shift;;--micro)exportmicro="1";;--cert)exportcert="1";;--raw|--raw-transport)exportraw="1";;--tss)exporttss="1";;--no-colors)exportNO_COLORS="1";;--language)exportLANGUAGE=$2shift;;--loss-rate)exportloss_rate=$2shift;;--get-netstat-info|--netstat)exportget_netstat_info="1";;--no-taskset)exportNO_TASKSET="1";;--ci)exportCI="1";;*)echo-e"unknown parameter \"$1\""exit255;;esacshiftdoneif[["$NO_COLORS"=="1"]];thendisable_colors
fiexportfolder_base="$(dirname"${executable}")"/../../..
if[[$LANGUAGE=="java"||"$LANGUAGE"=="cs"]];thenexportfolder_base="$(dirname"${executable}")"/../..
fiif[[$tss=="1"]];thenexportfolder_base="$(dirname"${executable}")"/../../../../..
fiif[["${executable_suffix}"!=""]];thenexportexecutable="${executable}${executable_suffix}"fiif[["${sub_folder}"!=""]];thenexportoutput_folder="${output_folder}/${sub_folder}"fiecho-e"${INFO_TAG} Perftest executable is: $executable"echo-e"${INFO_TAG} Output folder is: $output_folder"################################################################################if[["$LANGUAGE"=="python"]];thenexportskip_keyed_data="1"exportskip_large_data="1"exportskip_be_tests="1"exportskip_no_batching="1"fiif[["${skip_large_data}"=="1"]];thenexportdatasizes_extended=${datasizes}elif[["${large_data}"=="1"]];thenexportdatasizes=${datasizes_extended}fiif[["${datalen_input}"!=""]];thenecho-e"${YELLOW}[TEST] Testing only for ${datalen_input}${NC}"exportdatasizes=${datalen_input}exportdatasizes_extended=${datalen_input}if[["${no_batching_only}"!="1"]];thenexportskip_large_data="1"fielseif[["${CI}"!=""]];thenecho-e"${YELLOW}[TEST] Testing CI datasizes ${NC}"exportdatasizes="32 128 512 1024 8192 63000"exportdatasizes_extended="${datasizes} 100000 1048576 10485760"fifiif[["$role"!="pub"&&"$role"!="sub"]];thenecho-e"${ERROR_TAG} It must be either publisher or subscriber"exit255fiif[["$lat_thr"!="thr"&&"$lat_thr"!="lat"]];thenecho-e"${ERROR_TAG} It must be either lat or thr"exit255fiif[["${interface}"==""]];thenecho"Using default nics"exportnic_publisher=${ip_machine_1}exportnic_subscriber=${ip_machine_2}elif[["${interface}"=="both"]];thenexportnic_publisher="enp1s0f0,eno1"exportnic_subscriber="enp1s0f0,eno1"echo-e"${INFO_TAG} Using nic_publisher: ${nic_publisher}"echo-e"${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"elseexportnic_publisher=$interfaceecho-e"${INFO_TAG} Using nic_publisher: ${nic_publisher}"if[["${interface2}"==""]];thenexportnic_subscriber=$interfaceelseexportnic_subscriber=$interface2fiecho-e"${INFO_TAG} Using nic_subscriber: ${nic_subscriber}"if[["${ip1}"!=""]];thenexportip_publisher=$ip1echo"Using ip_publisher: ${ip_publisher}"fiif[["${ip2}"!=""]];thenexportip_subscriber=$ip2echo"Using ip_subscriber: ${ip_subscriber}"fifiexporttransport_string="-transport $transport"if[["$transport"=="UDPv4"]];thenexporttransport_string_pub="$transport_string -nic $nic_publisher"exporttransport_string_sub="$transport_string -nic $nic_subscriber"if[["$micro"=="1"||"$raw"=="1"||"$cert"=="1"]];thenexporttransport_string_pub="$transport_string_pub -peer ${ip_subscriber}"exporttransport_string_sub="$transport_string_sub -peer ${ip_publisher}"fielif[["$transport"=="TCP"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -peer 0@tcpv4_lan://${ip_subscriber}:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@tcpv4_lan://${ip_publisher}:7400"elif[["$transport"=="TLS"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -peer tlsv4_lan://${ip_subscriber}:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer tlsv4_lan://${ip_publisher}:7400"elif[["$transport"=="UDPv4_WAN"]];thenexporttransport_string_pub="$transport_string \ -nic $nic_publisher \ -transportPublicAddress $ip_publisher:7400"exporttransport_string_sub="$transport_string \ -nic $nic_subscriber \ -peer 0@udpv4_wan://${ip_publisher}:7400"elseexporttransport_string_pub="$transport_string"exporttransport_string_sub="$transport_string"fi################################################################################exportpub_string="-pub \${transport_string_pub} \ -noPrintIntervals \ -executionTime $exec_time"if[[${lat_thr}=="lat"]];thenexportpub_string="$pub_string \ -latencyTest"fiexportsub_string="-sub \${transport_string_sub} \ -noPrintIntervals"if[["$role"=="pub"]];thenecho-e"$INFO_TAG Publisher side running"exportcommands_string=${pub_string}exportextra_arguments="${extra_arguments}${extra_arguments_pub}"elseecho-e"$INFO_TAG Subscriber side running"exportcommands_string=${sub_string}exportextra_arguments="${extra_arguments}${extra_arguments_sub}"fi###############################################################################echo-e"${INFO_TAG} Executing: /set_${lat_thr}_mode.sh"
sudo/set_${lat_thr}_mode.sh
sleep5echo-e"${INFO_TAG} Disabling any loss rate"
sudotcqdiscadddev$nic_publisherrootnetemloss0%
sudotcqdiscdeldev$nic_publisherrootnetemloss0%
if[["$role"=="pub"&&"${loss_rate}"!=""]];thenecho-e"${INFO_TAG} Setting loss rate to ${loss_rate}%"sudotcqdiscadddev$nic_publisherrootnetemloss$loss_rate%
ficd$folder_baseecho-e"${INFO_TAG} Folder Base is: $PWD"
mkdir-p$output_folder# Tests that may use batching (when doing throughput tests)if[[${no_batching_only}!="1"]];then# UNKEYEDif[["${skip_unkeyed}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"unkeyed""rel""${datasizes_extended}""${extra_arguments}""$file_suffix"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"unkeyed""be""${datasizes}""${extra_arguments}""$file_suffix"fifi# KEYEDif[["${skip_keyed_data}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"keyed""rel""${datasizes}""${extra_arguments}""$file_suffix"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"keyed""be""${datasizes}""${extra_arguments}""$file_suffix"fififiif[["${skip_no_batching}"==""||"${no_batching_only}"=="1"]];thenno_batching_tests="1"fi# Tests that will not use batchingif[["${lat_thr}"=="thr"&&"${no_batching_tests}"=="1"]];thenif[["$role"=="pub"]];thenexportcommands_string="${commands_string} -batchSize 0"fi# UNKEYEDif[["${skip_unkeyed}"==""]];then# RELIABLEif[["${skip_rel_tests}"==""]];thenexecute_test"unkeyed""rel""${datasizes}""${extra_arguments}""_noBatch${file_suffix}"fi# BEST EFFORTif[["${skip_be_tests}"==""]];thenexecute_test"unkeyed""be""${datasizes}""${extra_arguments}""_noBatch${file_suffix}"fififiif[["$role"=="pub"&&"${loss_rate}"!=""]];thenecho-e"${INFO_TAG} Disabling loss rate"sudotcqdiscdeldev$nic_publisherrootnetemloss$loss_rate%
fi