-| | ...
-| | ... | \| \${throughpt}= \| Find Throughput Using MLRsearch \| \${0} \
-| | ... | \| \${0.001} \| \${10.0}\| \${1.0} \| \${1} \| ${720.0} \| ${2} \|
-| | ...
-| | [Arguments] | ${packet_loss_ratio}=${0.0}
-| | ... | ${final_relative_width}=${0.001} | ${final_trial_duration}=${10.0}
-| | ... | ${initial_trial_duration}=${1.0}
-| | ... | ${number_of_intermediate_phases}=${1} | ${timeout}=${720.0}
-| | ... | ${doublings}=${2}
-| | ...
-| | ${result} = | Perform optimized ndrpdr search | ${frame_size}
-| | ... | ${traffic_profile} | ${20000} | ${max_rate*2}
-| | ... | ${packet_loss_ratio} | ${final_relative_width}
-| | ... | ${final_trial_duration} | ${initial_trial_duration}
-| | ... | ${number_of_intermediate_phases} | timeout=${timeout}
-| | ... | doublings=${doublings}
-| | Return From Keyword | ${result.pdr_interval.measured_low.transmit_rate}
-
-| Find critical load using PLRsearch
-| | [Documentation]
-| | ... | Find boundaries for troughput (of given target loss ratio)
-| | ... | using PLRsearch algorithm.
-| | ... | Display results as formatted test message.
-| | ... | Fail if computed lower bound is below minimal rate.
-| | ... | Input rates are understood as uni-directional,
-| | ... | reported result contains bi-directional rates.
-| | ... | Currently, the min_rate value is hardcoded to match test teardowns.
-| | ... | Some inputs are read from variables to streamline suites.
-| | ...
-| | ... | *Test (or broader scope) variables read:*
-| | ... | - traffic_profile - Name of module defining traffc for measurements.
-| | ... | Type: string
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | - max_rate - Calculated unidirectional maximal transmit rate [pps].
-| | ... | Type: float
-| | ...
-| | ... | *Arguments:*
-| | ... | - packet_loss_ratio - Accepted loss during search. Type: float
-| | ... | - timeout - Stop when search duration is longer [s]. Type: float
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Find critical load using PLR search \| \${1e-7} \| \${120} \|
-| | ...
-| | [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}
-| | 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
-
-| Display result of NDRPDR search
-| | [Documentation]
-| | ... | Display result of NDR+PDR search, both quantities, both bounds,
-| | ... | 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.
-| | ...
-| | ... | *Test (or broader scope) variables read:*
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | *Arguments:*
-| | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Display result of NDRPDR search \| \${result} \|
-| | ...
-| | [Arguments] | ${result}
-| | ...
-| | ${frame_size} = | Get Average Frame Size | ${frame_size}
-| | Display single bound | NDR_LOWER
-| | ... | ${result.ndr_interval.measured_low.transmit_rate} | ${frame_size}
-| | ... | ${result.ndr_interval.measured_low.latency}
-| | Display single bound | NDR_UPPER
-| | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${frame_size}
-| | Display single bound | PDR_LOWER
-| | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${frame_size}
-| | ... | ${result.pdr_interval.measured_low.latency}
-| | Display single bound | PDR_UPPER
-| | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${frame_size}
-
-| Display result of soak search
-| | [Documentation]
-| | ... | Display result of soak search, avg+-stdev, as upper/lower bounds,
-| | ... | 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
-| | ... | TODO: Do we want to report some latency data,
-| | ... | even if not measured at the reported bounds?.
-| | ...
-| | ... | *Test (or broader scope) variables read:*
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | *Arguments:*
-| | ... | - avg - Estimated average critical load [pps]. Type: float
-| | ... | - stdev - Standard deviation of critical load [pps]. Type: float
-| | ...
-| | ... | *Returns:*
-| | ... | - Lower and upper bound of critical load [pps]. Type: 2-tuple of float
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Display result of soak search \| \${100000} \| \${100} \|
-| | ...
-| | [Arguments] | ${avg} | ${stdev}
-| | ...
-| | ${frame_size} = | Get Average Frame Size | ${frame_size}
-| | ${avg} = | Convert To Number | ${avg}
-| | ${stdev} = | Convert To Number | ${stdev}
-| | ${lower} = | Evaluate | ${avg} - ${stdev}
-| | ${upper} = | Evaluate | ${avg} + ${stdev}
-| | Display single bound | PLRsearch lower bound: | ${lower} | ${frame_size}
-| | Display single bound | PLRsearch upper bound: | ${upper} | ${frame_size}
-| | Return From Keyword | ${lower} | ${upper}
-
-| Check NDRPDR interval validity
-| | [Documentation]
-| | ... | Extract loss ratio of lower bound of the interval.
-| | ... | Fail if it does not reach the allowed value.
-| | ...
-| | ... | *Arguments:*
-| | ... | - interval - Measured interval. Type: ReceiveRateInterval
-| | ... | - packet_loss_ratio - Accepted loss (0.0 for NDR). Type: float
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Check NDRPDR interval validity \| \${result.pdr_interval} \
-| | ... | \| \${0.005} \|
-| | ...
-| | [Arguments] | ${interval} | ${packet_loss_ratio}=${0.0}
-| | ...
-| | ${lower_bound} = | Set Variable | ${interval.measured_low}
-| | ${lower_bound_lf} = | Set Variable | ${lower_bound.loss_fraction}
-| | Return From Keyword If | ${lower_bound_lf} <= ${packet_loss_ratio}
-| | ${message}= | Catenate | SEPARATOR=${SPACE}
-| | ... | Minimal rate loss fraction ${lower_bound_lf}
-| | ... | does not reach target ${packet_loss_ratio}.
-| | ${message_zero} = | Set Variable | Zero packets forwarded!
-| | ${message_other} = | Set Variable | ${lower_bound.loss_count} packets lost.
-| | ${message} = | Set Variable If | ${lower_bound_lf} >= 1.0
-| | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other}
-| | Fail | ${message}
-
-| Perform additional measurements based on NDRPDR result
-| | [Documentation]
-| | ... | Perform any additional measurements which are not directly needed
-| | ... | for determining NDR nor PDR, but which are needed for gathering
-| | ... | additional data for debug purposes.
-| | ... | Currently, just "Traffic should pass with no loss" is called.
-| | ... | TODO: Move latency measurements from optimized search here.
-| | ...
-| | ... | *Arguments:*
-| | ... | - result - Measured result data per stream [pps]. Type: NdrPdrResult
-| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: int or str
-| | ... | - traffic_profile - Topology profile. Type: string
-| | ...
-| | ... | *Example:*
-| | ... | \| Perform additional measurements based on NDRPDR result \
-| | ... | \| \${result} \| ${64} \| 3-node-IPv4 \|
-| | ...
-| | [Arguments] | ${result} | ${framesize} | ${traffic_profile}
-| | ...
-| | ${duration}= | Set Variable | 2.0
-| | ${rate_per_stream}= | Evaluate
-| | ... | ${result.ndr_interval.measured_low.target_tr} / 2.0
-| | Traffic should pass with no loss | ${duration} | ${rate_per_stream}pps
-| | ... | ${framesize} | ${traffic_profile} | fail_on_loss=${False}