X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_utils.robot;h=ee49b98adfd2e8852930032fc75389f792a2a6f1;hb=250d14332d04569f01117e614a25de290e629800;hp=a4fd2fa161a5a660415fb0e2f90b2f87d54dd48e;hpb=6ac704e7388409c6aa719e50f83d0e08ebd671a0;p=csit.git diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index a4fd2fa161..ee49b98adf 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -34,6 +34,9 @@ | | ... | Fail if a resulting lower bound has too high loss fraction. | | ... | Input rates are understood as uni-directional, | | ... | reported result contains aggregate rates. +| | ... | Additional latency measurements are performed for smaller loads, +| | ... | their results are also displayed. +| | ... | Finally, two measurements for runtime stats are done (not displayed). | | ... | Currently, the min_rate value is hardcoded to 90kpps, | | ... | allowing measurement at 10% of the discovered rate | | ... | without breaking latency streams. @@ -80,46 +83,34 @@ | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} | | Check NDRPDR interval validity | ${result.ndr_interval} -| | # Rate needs to be high enough for latency streams. -| | ${rate}= | Set Variable | ${9500} -| | Measure and show latency at specified rate | Latency at 0%: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} +| | ${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.1 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 10% NDR: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.5 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 50% NDR: +| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream} +| | Measure and show latency at specified rate | Latency at 90% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.9 * ${ndr_per_stream} -| | Measure and show latency at specified rate | Latency at 90% NDR: +| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream} +| | Measure and show latency at specified rate | Latency at 50% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${pdr_sum}= | Set Variable | ${result.pdr_interval.measured_low.target_tr} -| | ${pdr_per_stream}= | Evaluate | ${pdr_sum} / float(${traffic_directions}) | | ${rate}= | Evaluate | 0.1 * ${pdr_per_stream} | | Measure and show latency at specified rate | Latency at 10% PDR: | | ... | ${latency_duration} | ${rate}pps | ${framesize} | | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.5 * ${pdr_per_stream} -| | Measure and show latency at specified rate | Latency at 50% PDR: -| | ... | ${latency_duration} | ${rate}pps | ${framesize} -| | ... | ${traffic_profile} | ${traffic_directions} -| | ${rate}= | Evaluate | 0.9 * ${pdr_per_stream} -| | Measure and show latency at specified rate | Latency at 90% PDR: +| | # Rate needs to be high enough for latency streams. +| | ${rate}= | Set Variable | ${9500} +| | Measure and show latency at specified rate | Latency at 0% PDR: | | ... | ${latency_duration} | ${rate}pps | ${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} | ${ndr_per_stream}pps | ${framesize} | ${traffic_profile} +| | ... | ${1.0} | ${pdr_per_stream}pps | ${framesize} | ${traffic_profile} | | ... | traffic_directions=${traffic_directions} | | Send traffic at specified rate -| | ... | ${1.0} | ${pdr_per_stream}pps | ${framesize} | ${traffic_profile} +| | ... | ${1.0} | ${ndr_per_stream}pps | ${framesize} | ${traffic_profile} | | ... | traffic_directions=${traffic_directions} | Find Throughput Using MLRsearch @@ -170,7 +161,7 @@ | | ... | doublings=${doublings} | traffic_directions=${traffic_directions} | | Check NDRPDR interval validity | ${result.pdr_interval} | | ... | ${packet_loss_ratio} -| | Return From Keyword | ${result.pdr_interval.measured_low.transmit_rate} +| | Return From Keyword | ${result.pdr_interval.measured_low.target_tr} | Find critical load using PLRsearch | | [Documentation] @@ -287,15 +278,15 @@ | | | | ${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.target_tr} | ${frame_size} | | ... | ${result.ndr_interval.measured_low.latency} | | Display single bound | NDR_UPPER -| | ... | ${result.ndr_interval.measured_high.transmit_rate} | ${frame_size} +| | ... | ${result.ndr_interval.measured_high.target_tr} | ${frame_size} | | Display single bound | PDR_LOWER -| | ... | ${result.pdr_interval.measured_low.transmit_rate} | ${frame_size} +| | ... | ${result.pdr_interval.measured_low.target_tr} | ${frame_size} | | ... | ${result.pdr_interval.measured_low.latency} | | Display single bound | PDR_UPPER -| | ... | ${result.pdr_interval.measured_high.transmit_rate} | ${frame_size} +| | ... | ${result.pdr_interval.measured_high.target_tr} | ${frame_size} | Display result of soak search | | [Documentation] @@ -388,7 +379,8 @@ | | ... | ${fail_no_traffic}=${True} | ${subsamples}=${PERF_TRIAL_MULTIPLICITY} | | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1} | | -| | ${results} = | Send traffic at specified rate | ${trial_duration} +| | ${results} | ${approximated_results} = | Send traffic at specified rate +| | ... | ${trial_duration} | | ... | ${max_rate}pps | ${frame_size} | ${traffic_profile} | ${subsamples} | | ... | ${traffic_directions} | ${tx_port} | ${rx_port} | | Set Test Message | ${\n}Maximum Receive Rate trial results @@ -436,6 +428,7 @@ | | Run Keyword If | ${dut_stats}==${True} | | ... | VPP enable elog traces on all DUTs | ${nodes} | | ${results} = | Create List +| | ${approximated_results} = | Create List | | FOR | ${i} | IN RANGE | ${subsamples} | | | # The following line is skipping some default arguments, | | | # that is why subsequent arguments have to be named. @@ -444,8 +437,10 @@ | | | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port} | | | ... | rx_port=${rx_port} | | | ${rx} = | Get Received +| | | ${ar} = | Get Approximated Rate | | | ${rr} = | Evaluate | ${rx} / ${trial_duration} | | | Append To List | ${results} | ${rr} +| | | Append To List | ${approximated_results} | ${ar} | | END | | Run Keyword If | ${dut_stats}==${True} | Show event logger on all DUTs | | ... | ${nodes} @@ -453,7 +448,7 @@ | | ... | ${nodes} | | Run Keyword If | ${dut_stats}==${True} and ${pkt_trace}==${True} | | ... | Show Packet Trace On All Duts | ${nodes} | maximum=${100} -| | Return From Keyword | ${results} +| | Return From Keyword | ${results} | ${approximated_results} | Measure and show latency at specified rate | | [Documentation]