aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/performance/performance_utils.robot
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-09-23 15:00:00 +0200
committerVratko Polak <vrpolak@cisco.com>2019-09-24 10:24:38 +0200
commita1bd29103c1cfcfd9ea24d03b9f81f9029ff5ebd (patch)
treede04ae9c2d7d6208bca59ca592a688ab280bbfba /resources/libraries/robot/performance/performance_utils.robot
parentff8f6326efe2fccf5117bb1062f95fb07d2c26c9 (diff)
Reconf tests: Fix async measurements
TRex does not zero the server counters. It copies the values to use as reference, and subtracts them when asked for results. But the reference is stored in the client (not the server). And CSIT uses different scripts to start and stop async traffic, which means different clients. This patch introduces a workaround. Async start will return xstats objects to use as reference, and async stop will use the objects to compute the correct results. The xstats objects are stored in TrafficGenerator instance. Sync measurement does not export the counters, to shorten logs. Other improvements: + Make stop_traffic_on_tg return measurement results directly. + Rename --async to --async_start as "async" is reserved in Python 3.7 + Minor pylint, docstring and typo fixes. Change-Id: I5fc56a0763afb7d62cfa7c0651f96b6867de3e15 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.robot11
1 files changed, 8 insertions, 3 deletions
diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot
index d809376c0f..05059b78b5 100644
--- a/resources/libraries/robot/performance/performance_utils.robot
+++ b/resources/libraries/robot/performance/performance_utils.robot
@@ -501,7 +501,9 @@
| Start Traffic on Background
| | [Documentation]
| | ... | Start traffic at specified rate then return control to Robot.
-| | ... | Useful if the test needs to do something while traffic is running.
+| | ...
+| | ... | This keyword is useful if the test needs to do something
+| | ... | while traffic is running.
| | ... | Just a wrapper around L1 keyword.
| | ... |
| | ... | TODO: How to make sure the traffic is stopped on any failure?
@@ -533,14 +535,17 @@
| | [Documentation]
| | ... | Stop the running traffic, return measurement result.
| | ... | For bidirectional traffic, the reported values are bi-directional.
+| | ...
| | ... | Just a wrapper around L1 keyword.
| | ... |
| | ... | TODO: Tolerate if traffic was not started.
| | ...
+| | ... | *Returns:*
+| | ... | - Measurement result. Type: ReceiveRateMeasurement
+| | ...
| | ... | *Example:*
| | ...
| | ... | \${result}= \| Stop Running Traffic \|
| | ...
-| | Stop traffic on tg
-| | ${result}= | Get Measurement Result
+| | ${result}= | Stop traffic on tg
| | Return From Keyword | ${result}