-| | ...
-| | ... | \| Find critical load usingPLR search \| \${1e-7} \| \${1800} \|
-| | ...
-| | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${1800.0}
-| | ...
-| | ${min_rate} = | Set Variable | ${20000}
-| | ${average} | ${stdev} = | Perform soak search | ${frame_size}
-| | ... | ${traffic_profile} | ${min_rate} | ${max_rate*2}
-| | ... | ${packet_loss_ratio} | timeout=${timeout}
-| | ${lower} | ${upper} = | Display result of soak search
-| | ... | ${average} | ${stdev} | ${frame_size}
-| | Should Not Be True | ${lower} < ${min_rate}
-| | ... | Lower bound ${lower} is below bidirectional minimum ${min_rate}.
-
-| Display single bound
-| | [Documentation]
-| | ... | Display one bound of NDR+PDR search,
-| | ... | in packet per seconds (total and per stream)
-| | ... | and Gbps total bandwidth with untagged packet.
-| | ... | Througput is calculated as:
-| | ... | Measured rate per stream * Total number of streams
-| | ... | Bandwidth is calculated as:
-| | ... | (Throughput * (L2 Frame Size + IPG) * 8) / Max bitrate of NIC
-| | ... | The given result should contain latency data as well.
-| | ...
-| | ... | *Arguments:*
-| | ... | - text - Flavor text describing which bound is this. Type: string
-| | ... | - rate_total - Total (not per stream) measured Tr [pps]. Type: float
-| | ... | - frame_size - L2 Frame Size [B]. Type: integer
-| | ... | - latency - Latency data to display if non-empty. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \
-| | ... | \| \${64} \| show_latency=\${EMPTY} \|
-| | ...
-| | [Arguments] | ${text} | ${rate_total} | ${frame_size} | ${latency}=${EMPTY}
-| | ...
-| | ${bandwidth_total} = | Evaluate | ${rate_total} * (${frame_size}+20)*8 / 1e9
-| | Set Test Message | ${\n}${text}: ${rate_total} pps, | append=yes
-| | Set Test Message | ${bandwidth_total} Gbps (untagged) | append=yes
-| | Return From Keyword If | not """${latency}"""
-| | Set Test Message | ${\n}LATENCY usec [min/avg/max] per stream: ${latency}
-| | ... | append=yes
+| |
+| | ... | \| Find NDR and PDR intervals using optimized search \|
+| |
+| | # Get values via performance_vars.
+| | ${disable_latency} = | Get Disable Latency
+| | ${max_rate} = | Get Max Rate
+| | ${min_rate_soft} = | Get Min Rate Soft
+| | # \${packet_loss_ratio} is used twice so it is worth a variable.
+| | ${packet_loss_ratio} = | Get Packet Loss Ratio
+| | ${ppta} = | Get Packets Per Transaction Aggregated
+| | ${ramp_up_duration} = | Get Ramp Up Duration
+| | ${ramp_up_rate} = | Get Ramp Up Rate
+| | ${resetter} = | Get Resetter
+| | ${traffic_directions} = | Get Traffic Directions
+| | ${transaction_duration} = | Get Transaction Duration
+| | ${transaction_scale} = | Get Transaction Scale
+| | ${transaction_type} = | Get Transaction Type
+| | ${use_latency} = | Get Use Latency
+| | ${result} = | Perform optimized ndrpdr search
+| | ... | frame_size=${frame_size}
+| | ... | traffic_profile=${traffic_profile}
+| | ... | minimum_transmit_rate=${min_rate_soft}
+| | ... | maximum_transmit_rate=${max_rate}
+| | ... | packet_loss_ratio=${packet_loss_ratio}
+| | ... | final_relative_width=${0.005}
+| | ... | final_trial_duration=${30.0}
+| | ... | initial_trial_duration=${1.0}
+| | ... | number_of_intermediate_phases=${2}
+| | ... | timeout=${1200.0}
+| | ... | ppta=${ppta}
+| | ... | resetter=${resetter}
+| | ... | traffic_directions=${traffic_directions}
+| | ... | transaction_duration=${transaction_duration}
+| | ... | transaction_scale=${transaction_scale}
+| | ... | transaction_type=${transaction_type}
+| | ... | use_latency=${use_latency}
+| | ... | ramp_up_duration=${ramp_up_duration}
+| | ... | ramp_up_rate=${ramp_up_rate}
+| | Display result of NDRPDR search | ${result}
+| | Check NDRPDR interval validity | ${result[1]}
+| | ... | ${packet_loss_ratio}
+| | Check NDRPDR interval validity | ${result[0]}
+| | ${pdr} = | Set Variable | ${result[1].measured_low.target_tr}
+| | ${ndr} = | Set Variable | ${result[0].measured_low.target_tr}
+| | # We expect NDR and PDR to have different-looking stats.
+| | Send traffic at specified rate
+| | ... | rate=${pdr}
+| | ... | trial_duration=${1.0}
+| | ... | trial_multiplicity=${1}
+| | ... | use_latency=${use_latency}
+| | ... | duration_limit=${1.0}
+| | Run Keyword If | ${ndr} != ${pdr}
+| | ... | Send traffic at specified rate
+| | ... | rate=${ndr}
+| | ... | trial_duration=${1.0}
+| | ... | trial_multiplicity=${1}
+| | ... | use_latency=${use_latency}
+| | ... | duration_limit=${1.0}
+| | Return From Keyword If | ${disable_latency}
+| | ${rate} = | Evaluate | 0.9 * ${pdr}
+| | Measure and show latency at specified rate | Latency at 90% PDR: | ${rate}
+| | ${rate} = | Evaluate | 0.5 * ${pdr}
+| | Measure and show latency at specified rate | Latency at 50% PDR: | ${rate}
+| | ${rate} = | Evaluate | 0.1 * ${pdr}
+| | Measure and show latency at specified rate | Latency at 10% PDR: | ${rate}
+| | Measure and show latency at specified rate | Latency at 0% PDR: | ${0.0}