aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/performance
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/performance')
-rw-r--r--resources/libraries/robot/performance/performance_actions.robot80
-rw-r--r--resources/libraries/robot/performance/performance_display.robot94
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot109
-rw-r--r--resources/libraries/robot/performance/performance_vars.robot13
4 files changed, 190 insertions, 106 deletions
diff --git a/resources/libraries/robot/performance/performance_actions.robot b/resources/libraries/robot/performance/performance_actions.robot
index 3235dfa868..1d2ea52274 100644
--- a/resources/libraries/robot/performance/performance_actions.robot
+++ b/resources/libraries/robot/performance/performance_actions.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 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:
@@ -95,6 +95,81 @@
| | ... | ramp_up_rate=${ramp_up_rate}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_runtime.yaml
+| | ... | rate=${telemetry_rate} | export=${telemetry_export}
+| | Stop traffic on tg
+
+| Additional Statistics Action For bpf-runtime
+| | [Documentation]
+| | ... | Additional Statistics Action for linux bundle counters with
+| | ... | running traffic.
+| |
+| | ... | See documentation of the called keyword for required test variables.
+| |
+| | ${ppta} = | Get Packets Per Transaction Aggregated
+| | ${ramp_up_duration} = | Get Ramp Up Duration
+| | ${ramp_up_rate} = | Get Ramp Up Rate
+| | ${runtime_duration} = | Get Runtime Duration
+| | ${runtime_rate} = | Get Runtime Rate
+| | ${traffic_directions} = | Get Traffic Directions
+| | ${transaction_duration} = | Get Transaction Duration
+| | ${transaction_scale} = | Get Transaction Scale
+| | ${transaction_type} = | Get Transaction Type
+| | ${use_latency} = | Get Use Latency
+| | Send traffic on tg
+| | ... | duration=${-1}
+| | ... | rate=${runtime_rate}
+| | ... | frame_size=${frame_size}
+| | ... | traffic_profile=${traffic_profile}
+| | ... | async_call=${True}
+| | ... | ppta=${ppta}
+| | ... | use_latency=${use_latency}
+| | ... | traffic_directions=${traffic_directions}
+| | ... | transaction_duration=${transaction_duration}
+| | ... | transaction_scale=${transaction_scale}
+| | ... | transaction_type=${transaction_type}
+| | ... | duration_limit=${0.0}
+| | ... | ramp_up_duration=${ramp_up_duration}
+| | ... | ramp_up_rate=${ramp_up_rate}
+| | Run Telemetry On All DUTs
+| | ... | ${nodes} | profile=bpf_runtime.yaml
+| | ... | rate=${telemetry_rate} | export=${False}
+| | Stop traffic on tg
+
+| Additional Statistics Action For perf-stat-runtime
+| | [Documentation]
+| | ... | Additional Statistics Action for linux bundle counters with
+| | ... | running traffic.
+| |
+| | ... | See documentation of the called keyword for required test variables.
+| |
+| | ${ppta} = | Get Packets Per Transaction Aggregated
+| | ${ramp_up_duration} = | Get Ramp Up Duration
+| | ${ramp_up_rate} = | Get Ramp Up Rate
+| | ${runtime_duration} = | Get Runtime Duration
+| | ${runtime_rate} = | Get Runtime Rate
+| | ${traffic_directions} = | Get Traffic Directions
+| | ${transaction_duration} = | Get Transaction Duration
+| | ${transaction_scale} = | Get Transaction Scale
+| | ${transaction_type} = | Get Transaction Type
+| | ${use_latency} = | Get Use Latency
+| | Send traffic on tg
+| | ... | duration=${-1}
+| | ... | rate=${runtime_rate}
+| | ... | frame_size=${frame_size}
+| | ... | traffic_profile=${traffic_profile}
+| | ... | async_call=${True}
+| | ... | ppta=${ppta}
+| | ... | use_latency=${use_latency}
+| | ... | traffic_directions=${traffic_directions}
+| | ... | transaction_duration=${transaction_duration}
+| | ... | transaction_scale=${transaction_scale}
+| | ... | transaction_type=${transaction_type}
+| | ... | duration_limit=${0.0}
+| | ... | ramp_up_duration=${ramp_up_duration}
+| | ... | ramp_up_rate=${ramp_up_rate}
+| | Run Telemetry On All DUTs
+| | ... | ${nodes} | profile=perf_stat_runtime.yaml
+| | ... | rate=${telemetry_rate} | export=${False}
| | Stop traffic on tg
| Additional Statistics Action For vpp-runtime-iperf3
@@ -120,6 +195,7 @@
| | | ... | affinity=${iperf_client_affinity}
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_runtime.yaml
+| | ... | rate=${telemetry_rate} | export=${telemetry_export}
| | iPerf Client Stop Remote Exec | ${nodes['${iperf_client_node}']} | ${pids}
| Additional Statistics Action For noop
@@ -134,6 +210,7 @@
| |
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_clear_stats.yaml
+| | ... | export=${False}
| Additional Statistics Action For vpp-enable-packettrace
| | [Documentation]
@@ -155,3 +232,4 @@
| |
| | Run Telemetry On All DUTs
| | ... | ${nodes} | profile=vppctl_show_stats.yaml
+| | ... | export=${False}
diff --git a/resources/libraries/robot/performance/performance_display.robot b/resources/libraries/robot/performance/performance_display.robot
index 1313788d5e..6ee493a17e 100644
--- a/resources/libraries/robot/performance/performance_display.robot
+++ b/resources/libraries/robot/performance/performance_display.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 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:
@@ -17,35 +17,6 @@
| ... | This includes checks to fail test.
*** Keywords ***
-| 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_lr} = | Set Variable | ${lower_bound.loss_ratio}
-| | Return From Keyword If | ${lower_bound_lr} <= ${packet_loss_ratio}
-| | Set Test Variable | \${rate_for_teardown} | ${lower_bound.target_tr}
-| | ${message}= | Catenate | SEPARATOR=${SPACE}
-| | ... | Minimal rate loss ratio ${lower_bound_lr}
-| | ... | 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_lr} >= 1.0
-| | ... | ${message}${\n}${message_zero} | ${message}${\n}${message_other}
-| | Fail | ${message}
-
| Compute Bandwidth
| | [Documentation]
| | ... | Compute (bidir) bandwidth from given (unidir) transaction rate.
@@ -77,8 +48,8 @@
| | ... | due to reconfiguration under traffic.
| |
| | ... | *Arguments:*
-| | ... | - result - Result of bidirectional measurement.
-| | ... | Type: ReceiveRateMeasurement
+| | ... | - result - Result of MLRsearch invocation for one search goal.
+| | ... | Type: StatInterval
| |
| | ... | *Example:*
| |
@@ -86,23 +57,20 @@
| |
| | [Arguments] | ${result}
| |
-| | ${ppta} = | Get Packets Per Transaction Aggregated
-| | ${packet_rate} = | Evaluate | ${result.target_tr} * ${ppta}
+| | ${bandwidth} | ${packet_rate}= | Compute Bandwidth | ${result.intended_load}
| | ${packet_loss} = | Set Variable | ${result.loss_count}
| | ${time_loss} = | Evaluate | ${packet_loss} / ${packet_rate}
| | Set Test Message | Packets lost due to reconfig: ${packet_loss}
| | Set Test Message | ${\n}Implied time lost: ${time_loss} | append=yes
+| | Export Reconf Result | ${packet_rate} | ${packet_loss} | ${bandwidth * 1e9}
| Display result of NDRPDR search
| | [Documentation]
-| | ... | Display result of NDR+PDR search, both quantities, both bounds,
-| | ... | aggregated, in units given by trasaction type, e.g. by default
-| | ... | in packet per seconds and Gbps total bandwidth
+| | ... | Display result of NDR+PDR search, both quantities, aggregated,
+| | ... | conditional throughput only, in units given by trasaction type,
+| | ... | e.g. by default in packet per seconds and Gbps total bandwidth
| | ... | (for initial packet size).
-| | ... |
-| | ... | The bound to display is encoded as target rate, it is assumed
-| | ... | it is in transactions per second. Bidirectional traffic
-| | ... | transaction is understood as having 2 packets, for this purpose.
+| | ... | The lower bounds in the result are assumed to be valid.
| | ... |
| | ... | Througput is calculated as:
| | ... | Sum of measured rate over streams
@@ -115,8 +83,8 @@
| | ... | - transaction_type - String identifier to determine how to count
| | ... | transactions. Default is "packet".
| | ... | *Arguments:*
-| | ... | - result - Measured result data. Aggregated rate, tps or pps.
-| | ... | Type: NdrPdrResult
+| | ... | - result - Measured result data Tps. Type: List[TrimmedStat]
+| | ... | *Returns:* NDR and PDR: Unidirectional intended load as tps float.
| |
| | ... | *Example:*
| |
@@ -124,21 +92,18 @@
| |
| | [Arguments] | ${result}
| |
-| | Display single bound | NDR_LOWER
-| | ... | ${result[0].measured_low.target_tr}
-| | ... | ${result[0].measured_low.latency}
-| | Display single bound | NDR_UPPER
-| | ... | ${result[0].measured_high.target_tr}
-| | Display single bound | PDR_LOWER
-| | ... | ${result[1].measured_low.target_tr}
-| | ... | ${result[1].measured_low.latency}
-| | Display single bound | PDR_UPPER
-| | ... | ${result[1].measured_high.target_tr}
+| | ${ndr} = | Convert To Number | ${result[0].relevant_lower_bound}
+| | ${pdr} = | Convert To Number | ${result[1].relevant_lower_bound}
+| | Display single bound | NDR | ${result[0].conditional_throughput}
+| | Display single bound | PDR | ${result[1].conditional_throughput}
+| | Return From Keyword | ${ndr} | ${pdr}
| Display result of soak search
| | [Documentation]
| | ... | Display result of soak search, avg+-stdev, as upper/lower bounds.
| | ... | See Display single bound for units used.
+| | ... | The displayed values are bidirectional, based on conditional
+| | ... | throughput. The returned
| |
| | ... | *Test (or broader scope) variables read:*
| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or
@@ -148,7 +113,6 @@
| | ... | *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
| |
@@ -169,14 +133,14 @@
| Display single bound
| | [Documentation]
| | ... | Compute and display one bound of NDR+PDR (or soak) search result.
-| | ... | If the latency string is present, it is displayed as well.
| | ... |
| | ... | The bound to display is given as target transfer rate, it is assumed
-| | ... | it is in transactions per second. Bidirectional traffic
+| | ... | valid and in transactions per second. Bidirectional traffic
| | ... | transaction is understood as having 2 packets, for this purpose.
| | ... |
| | ... | Pps values are aggregated, in packet per seconds
| | ... | and Gbps total bandwidth (for initial packet size).
+| | ... | If the latency string is present, it is displayed as well.
| | ... |
| | ... | Througput is calculated as:
| | ... | Sum of measured rate over streams
@@ -189,20 +153,22 @@
| | ... | transactions. Default is "packet".
| | ... | *Arguments:*
| | ... | - text - Flavor text describing which bound is this. Type: string
-| | ... | - tps - Transaction rate [tps]. Type: float
+| | ... | - tps - Conditional throughput [tps]. Type: Union[float, DiscreteLoad]
| | ... | - latency - Latency data to display if non-empty. Type: string
| |
| | ... | *Example:*
| |
-| | ... | \| Display single bound \| NDR lower bound \| \${12345.67} \
+| | ... | \| Display single bound \| NDR \| \${12345.67} \
| | ... | \| latency=\${EMPTY} \|
| |
| | [Arguments] | ${text} | ${tps} | ${latency}=${EMPTY}
| |
+| | ${tps} = | Convert To Number | ${tps}
| | ${transaction_type} = | Get Transaction Type
| | Run Keyword And Return If | """_cps""" in """${transaction_type}"""
| | ... | Display Single CPS Bound | ${text} | ${tps} | ${latency}
-| | Display Single PPS Bound | ${text} | ${tps} | ${latency}
+| | Run Keyword And Return
+| | ... | Display Single PPS Bound | ${text} | ${tps} | ${latency}
| Display Single CPS Bound
| | [Documentation]
@@ -225,9 +191,8 @@
| | Set Test Message | ${\n}${text}: ${tps} CPS | append=yes
| | ${bandwidth} | ${pps} = | Compute Bandwidth | ${tps}
| | Export Search Bound | ${text} | ${tps} | cps | ${bandwidth * 1e9}
-| | Return From Keyword If | not """${latency}"""
-| | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency}
-| | ... | append=yes
+| | Run Keyword If | """${latency}""" | Set Test Message
+| | ... | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} | append=yes
| Display Single PPS Bound
| | [Documentation]
@@ -261,6 +226,5 @@
| | Set Test Message | ${\n}${text}: ${pps} pps, | append=yes
| | Set Test Message | ${bandwidth} Gbps (initial) | append=yes
| | Export Search Bound | ${text} | ${pps} | pps | ${bandwidth * 1e9}
-| | Return From Keyword If | not """${latency}"""
-| | Set Test Message | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency}
-| | ... | append=yes
+| | Run Keyword If | """${latency}""" | Set Test Message
+| | ... | ${\n}LATENCY [min/avg/max/hdrh] per stream: ${latency} | append=yes
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index c90fc7434d..4211486a19 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 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:
@@ -73,11 +73,28 @@
| | ${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}
-| | ... | minimum_transmit_rate=${min_rate_soft}
-| | ... | maximum_transmit_rate=${max_rate}
+| | ... | min_load=${min_rate_soft}
+| | ... | max_load=${max_rate}
| | ... | plr_target=${1e-7}
| | ... | tdpt=${0.1}
| | ... | initial_count=${50}
@@ -95,6 +112,15 @@
| | ${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
+| | Set Test Variable | ${telemetry_export} | ${True}
+| | 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}.
@@ -116,7 +142,7 @@
| | ... | - traffic_profile - Name of module defining traffc for measurements.
| | ... | Type: string
| | ... | - frame_size - L2 Frame Size [B] or IMIX string. Type: integer or
-| | ... | string
+| | ... | string.
| | ... | - max_rate - Calculated maximal unidirectional transmit rate [tps].
| | ... | Type: float
| | ... | - resetter - Callable to reset DUT state before each trial.
@@ -134,8 +160,7 @@
| | ${disable_latency} = | Get Disable Latency
| | ${max_rate} = | Get Max Rate
| | ${min_rate_soft} = | Get Min Rate Soft
-| | # \${packet_loss_ratio} is used twice so it is worth a variable.
-| | ${packet_loss_ratio} = | Get Packet Loss Ratio
+| | ${loss_ratio} = | Get Packet Loss Ratio
| | ${ppta} = | Get Packets Per Transaction Aggregated
| | ${ramp_up_duration} = | Get Ramp Up Duration
| | ${ramp_up_rate} = | Get Ramp Up Rate
@@ -145,17 +170,18 @@
| | ${transaction_scale} = | Get Transaction Scale
| | ${transaction_type} = | Get Transaction Type
| | ${use_latency} = | Get Use Latency
-| | ${result} = | Perform optimized ndrpdr search
+| | ${result} = | Perform MLR Search
| | ... | frame_size=${frame_size}
| | ... | traffic_profile=${traffic_profile}
-| | ... | minimum_transmit_rate=${min_rate_soft}
-| | ... | maximum_transmit_rate=${max_rate}
-| | ... | packet_loss_ratio=${packet_loss_ratio}
-| | ... | final_relative_width=${0.005}
-| | ... | final_trial_duration=${30.0}
+| | ... | min_load=${min_rate_soft}
+| | ... | max_load=${max_rate}
+| | ... | loss_ratio=${loss_ratio}
+| | ... | relative_width=${0.005}
| | ... | initial_trial_duration=${1.0}
-| | ... | number_of_intermediate_phases=${2}
-| | ... | timeout=${1200.0}
+| | ... | final_trial_duration=${1.0}
+| | ... | duration_sum=${21.0}
+| | ... | preceding_targets=${2}
+| | ... | search_duration_max=${1200.0}
| | ... | ppta=${ppta}
| | ... | resetter=${resetter}
| | ... | traffic_directions=${traffic_directions}
@@ -165,19 +191,18 @@
| | ... | use_latency=${use_latency}
| | ... | ramp_up_duration=${ramp_up_duration}
| | ... | ramp_up_rate=${ramp_up_rate}
-| | Display result of NDRPDR search | ${result}
-| | Check NDRPDR interval validity | ${result[1]}
-| | ... | ${packet_loss_ratio}
-| | Check NDRPDR interval validity | ${result[0]}
-| | ${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.
+| | ${ndr} | ${pdr} = | Display result of NDRPDR search | ${result}
+| | # We expect NDR and PDR to have different-looking telemetry.
+| | Set Test Variable | ${telemetry_rate} | pdr
+| | Set Test Variable | ${telemetry_export} | ${True}
| | 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
+| | Set Test Variable | ${telemetry_export} | ${True}
| | Run Keyword If | ${ndr} != ${pdr}
| | ... | Send traffic at specified rate
| | ... | rate=${ndr}
@@ -232,17 +257,18 @@
| | ${transaction_scale} = | Get Transaction Scale
| | ${transaction_type} = | Get Transaction Type
| | ${use_latency} = | Get Use Latency
-| | ${result} = | Perform optimized ndrpdr search
+| | ${result} = | Perform MLR Search
| | ... | frame_size=${frame_size}
| | ... | traffic_profile=${traffic_profile}
-| | ... | minimum_transmit_rate=${min_rate_soft}
-| | ... | maximum_transmit_rate=${max_rate}
-| | ... | packet_loss_ratio=${0.0}
-| | ... | final_relative_width=${0.001}
-| | ... | final_trial_duration=${10.0}
+| | ... | min_load=${min_rate_soft}
+| | ... | max_load=${max_rate}
+| | ... | loss_ratio=${0.0}
+| | ... | relative_width=${0.001}
| | ... | initial_trial_duration=${1.0}
-| | ... | number_of_intermediate_phases=${1}
-| | ... | timeout=${1200}
+| | ... | final_trial_duration=${1.0}
+| | ... | duration_sum=${11.0}
+| | ... | preceding_targets=${1}
+| | ... | search_duration_max=${1200}
| | ... | ppta=${ppta}
| | ... | resetter=${resetter}
| | ... | traffic_directions=${traffic_directions}
@@ -252,8 +278,8 @@
| | ... | use_latency=${use_latency}
| | ... | ramp_up_duration=${ramp_up_duration}
| | ... | ramp_up_rate=${ramp_up_rate}
-| | Check NDRPDR interval validity | ${result[0]}
-| | Return From Keyword | ${result[0].measured_low.target_tr}
+| | ${ret} = | Convert To Number | ${result[0].relevant_lower_bound}
+| | Return From Keyword | ${ret}
| Measure and show latency at specified rate
| | [Documentation]
@@ -330,7 +356,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
@@ -420,9 +446,10 @@
| | | ... | ramp_up_rate=${ramp_up_rate}
| | | # Out of several quantities for aborted traffic (duration stretching),
| | | # the approximated receive rate is the best estimate we have.
-| | | ${value} = | Set Variable | ${result.approximated_receive_rate}
-| | | # TODO: Add correct bandwidth computation.
-| | | Append Mrr Value | ${value} | ${export_mrr_unit}
+| | | ${value} = | Set Variable | ${result.forwarding_count}
+| | | ${value} = | Evaluate | ${value} / ${result.offered_duration}
+| | | ${bandwidth} | ${pps} = | Compute Bandwidth | ${value} / ${ppta}
+| | | Append Mrr Value | ${value} | ${export_mrr_unit} | ${bandwidth * 1e9}
| | | Append To List | ${results} | ${value}
| | END
| | FOR | ${action} | IN | @{stat_post_trial}
@@ -451,9 +478,12 @@
| | ... | ${trial_multiplicity}=${trial_multiplicity}
| | ... | ${traffic_directions}=${1}
| |
+| | Set Test Variable | ${telemetry_rate} | mrr
+| | Set Test Variable | ${telemetry_export} | ${True}
| | ${results}= | Send iPerf3 traffic at specified rate
| | ... | ${trial_duration} | ${None} | ${None}
| | ... | ${trial_multiplicity} | ${traffic_directions}
+| | ... | export_mrr_unit=bps
| | Set Test Message | ${\n}iPerf3 trial results
| | Set Test Message | in Gbits per second: ${results}
| | ... | append=yes
@@ -478,6 +508,9 @@
| | ... | Type: integer
| | ... | - extended_debug - True to enable extended debug.
| | ... | Type: boolean
+| | ... | - export_mrr_unit - Use this unit when exporting MRR values,
+| | ... | or empty string for no export.
+| | ... | Type: string
| |
| | ... | *Example:*
| |
@@ -487,6 +520,7 @@
| | [Arguments] | ${trial_duration} | ${rate} | ${frame_size}
| | ... | ${trial_multiplicity}=${trial_multiplicity}
| | ... | ${traffic_directions}=${1} | ${extended_debug}=${extended_debug}
+| | ... | ${export_mrr_unit}=${Empty}
| |
| | Set Test Variable | ${extended_debug}
| | Set Test Variable | ${rate}
@@ -547,6 +581,7 @@
| | | ... | bind=${iperf_client_bind}
| | | ... | affinity=${iperf_client_affinity}
| | | ${conv} = | Convert To Number | ${rr['sum_received']['bits_per_second']}
+| | | Append Mrr Value | ${conv} | ${export_mrr_unit}
| | | ${conv} = | Evaluate | ${conv} / ${1000} / ${1000} / ${1000}
| | | ${conv} = | Evaluate | "{:.3f}".format(${conv})
| | | Append To List
@@ -603,7 +638,6 @@
| | ... | transaction_scale=${transaction_scale}
| | ... | transaction_type=${transaction_type}
| | ... | use_latency=${use_latency}
-| | # TODO: Ramp-up?
| Stop Running Traffic
| | [Documentation]
@@ -640,6 +674,8 @@
| |
| | ... | \| Traffic should pass with maximum rate \|
| |
+| | Set Test Variable | ${telemetry_rate} | mrr
+| | Set Test Variable | ${telemetry_export} | ${True}
| | ${max_rate} = | Get Max Rate
| | ${transaction_type} = | Get Transaction Type
| | ${trial_duration} = | Get Mrr Trial Duration
@@ -647,7 +683,6 @@
| | ${use_latency} = | Get Use Latency
| | ${unit} = | Set Variable If | """_cps""" in """${transaction_type}"""
| | ... | cps | pps
-| | # The following also sets \${rate_for_teardown}
| | ${results} = | Send traffic at specified rate
| | ... | rate=${max_rate}
| | ... | trial_duration=${trial_duration}
diff --git a/resources/libraries/robot/performance/performance_vars.robot b/resources/libraries/robot/performance/performance_vars.robot
index 0721634f71..a0fa277e4c 100644
--- a/resources/libraries/robot/performance/performance_vars.robot
+++ b/resources/libraries/robot/performance/performance_vars.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 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:
@@ -404,6 +404,8 @@
| | ... | *Test variables set:*
| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be
| | ... | enabled. Type: boolean
+| | ... | - recommended_mtu - Resonable value (with space for encap overhead)
+| | ... | according to jumbo. Type: int
| |
| | ... | *Example:*
| |
@@ -413,11 +415,14 @@
| | Set Numeric Frame Sizes
| | ${jumbo} = | Evaluate | ${max_frame_size} >= 1522
| | Set Test Variable | \${jumbo}
+| | ${recommended_mtu} = | Set Variable If | ${jumbo} | ${9200} | ${1800}
+| | Set Test Variable | \${recommended_mtu}
| Set Max Rate And Jumbo
| | [Documentation]
-| | ... | This keyword computes maximal unidirectional transmit rate
-| | ... | and jumbo boolean (some suites need that for configuration decisions).
+| | ... | This keyword computes maximal unidirectional transmit rate,
+| | ... | jumbo boolean (some suites need that for configuration decisions),
+| | ... | and recommended MTU value (depends on jumbo).
| | ... | To streamline suite autogeneration, both input and output values
| | ... | are communicated as test (or broader scope) variables,
| | ... | instead of explicit arguments and return values.
@@ -447,6 +452,8 @@
| | ... | Type: float
| | ... | - jumbo - Jumbo boolean, true if jumbo packet support has to be
| | ... | enabled. Type: boolean
+| | ... | - recommended_mtu - Resonable value (with space for encap overhead)
+| | ... | according to jumbo. Type: int
| | ... | - max_frame_size - Maximal frame size including overhead. Type: float
| | ... | - avg_directional_frame_size - Average frame size including overhead
| | ... | for the more loaded direction. Type: float