X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fperformance%2Fperformance_utils.robot;h=a43f38e2fef05d163cde5f27386674c177cad615;hb=f4dbca1c0390d1702737db97869c54d997fd4525;hp=f2cb873d1a26747ea5a44ec7f9486476285909db;hpb=01d8f262afc567c3d49a23c3cb2cdeaced8a6887;p=csit.git diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index f2cb873d1a..a43f38e2fe 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -46,7 +46,7 @@ | | ... | Display results as formatted test message. | | ... | Fail if computed lower bound is 110% of the minimal rate or less. | | ... | Input rates are unidirectional, in transaction per second. -| | ... | Reported result may contain aggregate pps rates, depending on test. +| | ... | Reported result may contain aggregated pps rates, depending on test. | | ... | Call \${resetter} (if defined) to reset DUT state before each trial. | | | | ... | *Test (or broader scope) variables read:* @@ -73,6 +73,23 @@ | | ${transaction_scale} = | Get Transaction Scale | | ${transaction_type} = | Get Transaction Type | | ${use_latency} = | Get Use Latency +| | # TRex needs a warmup to avoid unsent packets at half-max rate. +| | Send traffic on tg +| | ... | duration=1.0 +| | ... | rate=${max_rate} +| | ... | frame_size=${frame_size} +| | ... | traffic_profile=${traffic_profile} +| | ... | async_call=${False} +| | ... | duration_limit=${1.0} +| | ... | ppta=${ppta} +| | ... | traffic_directions=${traffic_directions} +| | ... | transaction_duration=${transaction_duration} +| | ... | transaction_scale=${transaction_scale} +| | ... | transaction_type=${transaction_type} +| | ... | use_latency=False +| | ... | ramp_up_duration=${0.0} +| | ... | ramp_up_rate=${0.0} +| | # Ready for main search. | | ${average} | ${stdev} = | Perform soak search | | ... | frame_size=${frame_size} | | ... | traffic_profile=${traffic_profile} @@ -95,6 +112,14 @@ | | ${lower} | ${upper} = | Display result of soak search | | ... | ${average} | ${stdev} | | Set Test Variable | \${rate for teardown} | ${lower} +| | # Stats at the discovered critical rate. +| | Set Test Variable | ${telemetry_rate} | plr +| | Send traffic at specified rate +| | ... | rate=${lower} +| | ... | trial_duration=${1.0} +| | ... | trial_multiplicity=${1} +| | ... | use_latency=${use_latency} +| | ... | duration_limit=${1.0} | | Should Not Be True | 1.1 * ${min_rate_soft} > ${lower} | | ... | Lower bound ${lower} too small for unidir minimum ${min_rate_soft}. @@ -105,7 +130,7 @@ | | ... | Display findings as a formatted test message. | | ... | Fail if a resulting lower bound has too high loss ratio. | | ... | Input rates are unidirectional, in transaction per second. -| | ... | Reported result may contain aggregate pps rates, depending on test. +| | ... | Reported result may contain aggregated pps rates, depending on test. | | ... | Additional latency measurements are performed for smaller loads, | | ... | even if latency stream is disabled in search. Their results | | ... | are also displayed. @@ -172,12 +197,14 @@ | | ${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. +| | Set Test Variable | ${telemetry_rate} | pdr | | Send traffic at specified rate | | ... | rate=${pdr} | | ... | trial_duration=${1.0} | | ... | trial_multiplicity=${1} | | ... | use_latency=${use_latency} | | ... | duration_limit=${1.0} +| | Set Test Variable | ${telemetry_rate} | ndr | | Run Keyword If | ${ndr} != ${pdr} | | ... | Send traffic at specified rate | | ... | rate=${ndr} @@ -330,7 +357,7 @@ | | ... | \| Send ramp-up traffic \| | | | | ${ramp_up_rate} = | Get Ramp Up Rate -| | Run Keyword Unless | ${ramp_up_rate} > 0.0 | Fail | Ramp up rate missing! +| | Run Keyword If | ${ramp_up_rate} <= 0.0 | Fail | Ramp up rate missing! | | ${ramp_up_duration} = | Get Ramp Up Duration | | ${ppta} = | Get Packets Per Transaction Aggregated | | ${traffic_directions} = | Get Traffic Directions @@ -451,6 +478,7 @@ | | ... | ${trial_multiplicity}=${trial_multiplicity} | | ... | ${traffic_directions}=${1} | | +| | Set Test Variable | ${telemetry_rate} | mrr | | ${results}= | Send iPerf3 traffic at specified rate | | ... | ${trial_duration} | ${None} | ${None} | | ... | ${trial_multiplicity} | ${traffic_directions} @@ -468,7 +496,7 @@ | | ... | *Arguments:* | | ... | - trial_duration - Duration of single trial [s]. | | ... | Type: float -| | ... | - rate - Target aggregate transmit rate [bps] / Bits per second +| | ... | - rate - Target aggregated transmit rate [bps] / Bits per second. | | ... | Type: float | | ... | - frame_size - L2 Frame Size [B]. | | ... | Type: integer or string @@ -509,14 +537,14 @@ | | ... | bind_mask=${iperf_server_bind_mask} | | ... | namespace=${iperf_server_namespace} | | ... | cpu_skip_cnt=${cpu_skip_cnt} -| | Run Keyword If | '${iperf_client_namespace}' is not '${None}' +| | Run Keyword If | '${iperf_client_namespace}' != '${None}' | | ... | Set Linux Interface IP | | ... | ${nodes['${iperf_client_node}']} | | ... | interface=${iperf_client_interface} | | ... | ip_addr=${iperf_client_bind} | | ... | prefix=${iperf_client_bind_mask} | | ... | namespace=${iperf_client_namespace} -| | Run Keyword If | '${iperf_client_namespace}' is not '${None}' +| | Run Keyword If | '${iperf_client_namespace}' != '${None}' | | ... | Add Default Route To Namespace | | ... | ${nodes['${iperf_client_node}']} | | ... | namespace=${iperf_client_namespace} @@ -603,7 +631,6 @@ | | ... | transaction_scale=${transaction_scale} | | ... | transaction_type=${transaction_type} | | ... | use_latency=${use_latency} -| | # TODO: Ramp-up? | Stop Running Traffic | | [Documentation] @@ -648,6 +675,7 @@ | | ${unit} = | Set Variable If | """_cps""" in """${transaction_type}""" | | ... | cps | pps | | # The following also sets \${rate_for_teardown} +| | Set Test Variable | ${telemetry_rate} | mrr | | ${results} = | Send traffic at specified rate | | ... | rate=${max_rate} | | ... | trial_duration=${trial_duration}