+| |
+| | ... | \| Find NDR and PDR intervals using optimized search \| \${0.005} \
+| | ... | \| \${0.005} \| \${30.0} \| \${1.0} \| \${2} \| \${600.0} \| \${2} \
+| | ... | \| \${2} \| ${5.0} \|
+| |
+| | [Arguments] | ${packet_loss_ratio}=${0.005}
+| | ... | ${final_relative_width}=${0.005} | ${final_trial_duration}=${30.0}
+| | ... | ${initial_trial_duration}=${1.0}
+| | ... | ${number_of_intermediate_phases}=${2} | ${timeout}=${720.0}
+| | ... | ${doublings}=${2} | ${traffic_directions}=${2}
+| | ... | ${latency_duration}=${PERF_TRIAL_LATENCY_DURATION}
+| | ... | ${latency}=${True}
+| |
+| | # Latency measurements will need more than 9000 pps.
+| | ${result} = | Perform optimized ndrpdr search | ${frame_size}
+| | ... | ${traffic_profile} | ${9001} | ${max_rate}
+| | ... | ${packet_loss_ratio} | ${final_relative_width}
+| | ... | ${final_trial_duration} | ${initial_trial_duration}
+| | ... | ${number_of_intermediate_phases} | timeout=${timeout}
+| | ... | doublings=${doublings} | traffic_directions=${traffic_directions}
+| | ... | latency=${latency}
+| | Display result of NDRPDR search | ${result}
+| | Check NDRPDR interval validity | ${result.pdr_interval}
+| | ... | ${packet_loss_ratio}
+| | Check NDRPDR interval validity | ${result.ndr_interval}
+| | ${pdr_sum}= | Set Variable | ${result.pdr_interval.measured_low.target_tr}
+| | ${pdr_per_stream}= | Evaluate | ${pdr_sum} / float(${traffic_directions})
+| | ${ndr_sum}= | Set Variable | ${result.ndr_interval.measured_low.target_tr}
+| | ${ndr_per_stream}= | Evaluate | ${ndr_sum} / float(${traffic_directions})
+| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream}
+| | Run Keyword If | ${latency}
+| | ... | Measure and show latency at specified rate | Latency at 90% PDR:
+| | ... | ${latency_duration} | ${rate} | ${framesize}
+| | ... | ${traffic_profile} | ${traffic_directions}
+| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream}
+| | Run Keyword If | ${latency}
+| | ... | Measure and show latency at specified rate | Latency at 50% PDR:
+| | ... | ${latency_duration} | ${rate} | ${framesize}
+| | ... | ${traffic_profile} | ${traffic_directions}
+| | ${rate}= | Evaluate | 0.1 * ${pdr_per_stream}
+| | Run Keyword If | ${latency}
+| | ... | Measure and show latency at specified rate | Latency at 10% PDR:
+| | ... | ${latency_duration} | ${rate} | ${framesize}
+| | ... | ${traffic_profile} | ${traffic_directions}
+| | Run Keyword If | ${latency}
+| | ... | Measure and show latency at specified rate | Latency at 0% PDR:
+| | ... | ${latency_duration} | ${0} | ${framesize}
+| | ... | ${traffic_profile} | ${traffic_directions}
+| | # Finally, trials with runtime and other stats.
+| | # We expect NDR and PDR to have different-looking stats.
+| | Send traffic at specified rate
+| | ... | ${1.0} | ${pdr_per_stream} | ${framesize} | ${traffic_profile}
+| | ... | traffic_directions=${traffic_directions}
+| | Send traffic at specified rate
+| | ... | ${1.0} | ${ndr_per_stream} | ${framesize} | ${traffic_profile}
+| | ... | traffic_directions=${traffic_directions}