diff options
author | Vratko Polak <vrpolak@cisco.com> | 2019-09-23 15:00:00 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2019-09-24 07:47:06 +0000 |
commit | bab0b570345ceb6ffeaec9e47a50e62d7303387e (patch) | |
tree | 4ddb29534d9dd1048d1561cc0b93474323c6705b /resources/libraries/robot | |
parent | c7c31d5a09cd56ac5faab8d6f690aea00fa9e051 (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')
-rw-r--r-- | resources/libraries/robot/performance/performance_utils.robot | 11 |
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 198147be5d..60d51f6dfe 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -524,7 +524,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? @@ -558,14 +560,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} |