Add continue/fail option for enable traces
[csit.git] / resources / libraries / robot / performance / performance_utils.robot
index 9661b52..71e20af 100644 (file)
@@ -89,6 +89,8 @@
 | | Check NDRPDR interval validity | ${result.pdr_interval}
 | | ... | ${packet_loss_ratio}
 | | Check NDRPDR interval validity | ${result.ndr_interval}
+| | Perform additional measurements based on NDRPDR result
+| | ... | ${result} | ${frame_size} | ${traffic_profile}
 
 | Find critical load using PLRsearch
 | | [Documentation]
 | | ...
 | | ... | *Example:*
 | | ...
-| | ... | \| Find critical load usingPLR search \| \${1e-7} \| \${1800} \|
+| | ... | \| Find critical load using PLR search \| \${1e-7} \| \${120} \|
 | | ...
-| | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${1800.0}
+| | [Arguments] | ${packet_loss_ratio}=${1e-7} | ${timeout}=${7200.0}
 | | ...
 | | ${min_rate} = | Set Variable | ${20000}
 | | ${average} | ${stdev} = | Perform soak search | ${frame_size}
 | | ... | ${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}
+
 | Traffic should pass with no loss
 | | [Documentation]
 | | ... | Send traffic at specified rate. No packet loss is accepted at loss
 | | ... | ${unidirection} | ${tx_port} | ${rx_port}
 | | Run Keyword If | ${dut_stats}==${True} | Clear all counters on all DUTs
 | | Run Keyword If | ${dut_stats}==${True} and ${pkt_trace}==${True}
-| | ... | VPP Enable Traces On All DUTs | ${nodes}
+| | ... | VPP Enable Traces On All DUTs | ${nodes} | fail_on_error=${False}
 | | Run Keyword If | ${dut_stats}==${True}
 | | ... | VPP enable elog traces on all DUTs | ${nodes}
 | | ${results} = | Create List