aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2020-09-11 09:07:13 +0200
committerJan Gelety <jgelety@cisco.com>2020-09-12 14:15:08 +0200
commit4b1b28d1837a77dff1935475e0d2a115acc7a00e (patch)
tree23c9feb3ab0556f8140de1603475754927d19e8f /resources/libraries
parent4ef5084ab5f583fb567bed24628f75a20e0df04c (diff)
Framework: Add possibility to send ramp-up traffic
Change-Id: Ie24184ca4ac2d6c7abc32f0f103e10bc402ad93b Signed-off-by: Jan Gelety <jgelety@cisco.com> (cherry picked from commit 61044d391d6e8d6b47d0d4f156071bd61cd278df) Change-Id: I50e2a674784688e6eeea566fc2bc4d45a8ecfb8b Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/robot/ip/nat.robot6
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot59
2 files changed, 43 insertions, 22 deletions
diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot
index 2c88cbb294..b78575a960 100644
--- a/resources/libraries/robot/ip/nat.robot
+++ b/resources/libraries/robot/ip/nat.robot
@@ -191,6 +191,12 @@
| |
| | Show DET44 | ${node}
+| Verify DET44 sessions number on DUT1 node
+| | [Documentation] | Verify that all required DET44 sessions are established on
+| | ... | DUT1 node.
+| |
+| | Verify DET44 sessions number | ${nodes['DUT1']} | ${n_sessions}
+
| Verify DET44 sessions number
| | [Documentation] | Verify that all required DET44 sessions are established.
| |
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index d820d5c187..b9c4dc08d1 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -30,11 +30,6 @@
| ${trial_duration}= | ${PERF_TRIAL_DURATION}
| ${trial_multiplicity}= | ${PERF_TRIAL_MULTIPLICITY}
| ${extended_debug}= | ${EXTENDED_DEBUG}
-| # 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
@@ -464,13 +459,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
@@ -478,10 +472,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}
@@ -575,6 +569,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.
@@ -686,21 +711,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.