Reconf tests: Fix async measurements 09/22209/1
authorVratko Polak <vrpolak@cisco.com>
Mon, 23 Sep 2019 13:00:00 +0000 (15:00 +0200)
committerVratko Polak <vrpolak@cisco.com>
Tue, 24 Sep 2019 08:24:38 +0000 (10:24 +0200)
commita1bd29103c1cfcfd9ea24d03b9f81f9029ff5ebd
treede04ae9c2d7d6208bca59ca592a688ab280bbfba
parentff8f6326efe2fccf5117bb1062f95fb07d2c26c9
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>
resources/libraries/python/TrafficGenerator.py
resources/libraries/robot/performance/performance_utils.robot
resources/tools/trex/trex_stateless_profile.py
resources/tools/trex/trex_stateless_stop.py

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.