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_utils.robot59
1 files changed, 37 insertions, 22 deletions
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index 34c8c997a1..69402dcd41 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -34,11 +34,6 @@
| # that means the main heap size will be set to 2G. Some tests may require more
| # memory for IP FIB (e.g. nat44det tests with 4M or 16M sessions).
| ${heap_size_mult}= | ${1}
-| # Variable holding trial duration extension [s] used in pre_stats action
-| # clear-show-runtime-with-traffic. By default it is set to 0 but some
-| # tests (e.g. NAT) needs this duration extension in ramp up phase (e.g. to
-| # create all required nat sessions).
-| ${pre_stats_duration_ext}= | ${0}
*** Keywords ***
| Find NDR and PDR intervals using optimized search
@@ -468,13 +463,12 @@
| | ... | ${extended_debug}=${extended_debug} | ${latency}=${False}
| |
| | Set Test Variable | ${extended_debug}
-| | # Following setting of test variables is needed as
-| | # "Clear and show runtime counters with running traffic" has been moved to
-| | # pre_stats actions.
+| | # Following setting of test variables is needed for some pre_stats actions.
| | Set Test Variable | ${rate}
| | Set Test Variable | ${traffic_directions}
| | Set Test Variable | ${tx_port}
| | Set Test Variable | ${rx_port}
+| |
| | FOR | ${action} | IN | @{pre_stats}
| | | Run Keyword | Additional Statistics Action For ${action}
| | END
@@ -482,10 +476,10 @@
| | FOR | ${i} | IN RANGE | ${trial_multiplicity}
| | | # The following line is skipping some default arguments,
| | | # that is why subsequent arguments have to be named.
-| | | Send traffic on tg | ${trial_duration} | ${rate} | ${frame_size}
-| | | ... | ${traffic_profile} | warmup_time=${0}
-| | | ... | traffic_directions=${traffic_directions} | tx_port=${tx_port}
-| | | ... | rx_port=${rx_port} | latency=${latency}
+| | | Send traffic on tg
+| | | ... | ${trial_duration} | ${rate} | ${frame_size} | ${traffic_profile}
+| | | ... | warmup_time=${0} | traffic_directions=${traffic_directions}
+| | | ... | tx_port=${tx_port} | rx_port=${rx_port} | latency=${latency}
| | | ${rx} = | Get Received
| | | ${rr} = | Evaluate | ${rx} / ${trial_duration}
| | | Append To List | ${results} | ${rr}
@@ -579,6 +573,37 @@
| | END
| | Stop traffic on tg
+| Send ramp-up traffic
+| | [Documentation]
+| | ... | Start ramp-up traffic at specified rate for defined duration.
+| |
+| | ... | *Arguments:*
+| | ... | - duration - Duration of traffic run [s]. Type: integer
+| | ... | - rate - Rate [pps] for sending packets in case of T-Rex stateless
+| | ... | mode or multiplier of profile CPS in case of T-Rex astf mode.
+| | ... | Type: float
+| | ... | - frame_size - L2 Frame Size [B] or IMIX_v4_1. Type: integer or string
+| | ... | - traffic_profile - Name of module defining traffc for measurements.
+| | ... | Type: string
+| | ... | - traffic_directions - Bi- (2) or uni- (1) directional traffic.
+| | ... | Type: integer
+| | ... | - tx_port - TX port of TG; default value: 0. Type: integer
+| | ... | - rx_port - RX port of TG, default value: 1. Type: integer
+| |
+| | ... | *Example:*
+| |
+| | ... | \| Send ramp-up traffic \| \${10} \| ${400000.0} \| ${64} \
+| | ... | \| ${2} \| ${0} \| ${1} \|
+| |
+| | [Arguments] | ${duration}=${ramp_up_duration} | ${rate}=${ramp_up_rate}
+| | ... | ${frame_size}=${frame_size} | ${traffic_profile}=${traffic_profile}
+| | ... | ${traffic_directions}=${2} | ${tx_port}=${0} | ${rx_port}=${1}
+| |
+| | Send traffic on tg
+| | ... | ${duration} | ${rate} | ${frame_size} | ${traffic_profile}
+| | ... | warmup_time=${0} | traffic_directions=${traffic_directions}
+| | ... | tx_port=${tx_port} | rx_port=${rx_port} | latency=${False}
+
| Start Traffic on Background
| | [Documentation]
| | ... | Start traffic at specified rate then return control to Robot.
@@ -690,21 +715,11 @@
| | ... | Additional Statistics Action for clear and show runtime counters with
| | ... | running traffic.
| |
-| | ${trial_duration}= | Evaluate
-| | ... | ${trial_duration} + ${pre_stats_duration_ext}
-| | ${rate}= | Get Variable Value | ${pre_stats_rate} | ${rate}
| | Clear and show runtime counters with running traffic
| | ... | ${trial_duration} | ${rate}
| | ... | ${frame_size} | ${traffic_profile} | ${traffic_directions}
| | ... | ${tx_port} | ${rx_port}
-| Additional Statistics Action For vpp-det44-verify-sessions
-| | [Documentation]
-| | ... | Additional Statistics Action to verify that all required DET44
-| | ... | sessions are established.
-| |
-| | Verify DET44 sessions number | ${nodes['DUT1']} | ${n_sessions}
-
| Additional Statistics Action For noop
| | [Documentation]
| | ... | Additional Statistics Action for no operation.