aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/performance/performance_utils.robot
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2022-09-30 10:23:03 +0200
committerPeter Mikus <peter.mikus@protonmail.ch>2022-09-30 10:26:28 +0000
commit141f1d7e939ebe7ca73d4d27c554cdfd8fc3f86d (patch)
treef42218f1933d8d8740ae56daf7154e3aa1e319b0 /resources/libraries/robot/performance/performance_utils.robot
parent4e5d530099efed0c77d531a06d505c73c80ea71e (diff)
feat(soak): add warmup and stats
Specifically on 2n-icx, soak tests are suffering from the first search trial (at half of max rate) reporting unsent packets, thus polluting the results, see CSIT-1867. This adds a plain trial (no stats, result ignored), fixing the issue. To keep the structure similar to NDRPDR tests, stats trial is done after the search, at the discovered critical rate. Ticket: CSIT-1867 Change-Id: I12ff6f58c4eb174594e667bfa86ba1585164b8ef Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/robot/performance/performance_utils.robot')
-rw-r--r--resources/libraries/robot/performance/performance_utils.robot24
1 files changed, 24 insertions, 0 deletions
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index bdac178125..47c76661cb 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -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,13 @@
| | ${lower} | ${upper} = | Display result of soak search
| | ... | ${average} | ${stdev}
| | Set Test Variable | \${rate for teardown} | ${lower}
+| | # Stats at the discovered critical rate.
+| | 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}.