fix(perf): Ignore negative count trials 24/39524/9
authorVratko Polak <[email protected]>
Mon, 28 Apr 2025 08:16:12 +0000 (10:16 +0200)
committerVratko Polak <[email protected]>
Wed, 14 May 2025 11:31:13 +0000 (11:31 +0000)
commitff782c9d006ae8f1ba128bd6839ecc0f2c86c6b2
tree14d04b1a2c434bc2957cf425e60dfccd7ce86b00
parentf3dfc960d58b58ea0d0c2ef28e4b61e6acdbc402
fix(perf): Ignore negative count trials

Sometimes, TRex wrongly gives negative number of forwarded packets.
As json schema requires non-negative values, this is not acceptable.

The MRR export keyword is changed to raise an exception,
the robot keyword has added logic to explicitly skip without export.

MRR json can still fail validation if all 10 trials are skipped.
With this change, the JSON is exported as failed,
but Robot test is not failed (left TODO to add later if needed).

For ndrpdr and soak tests, ignoring such trials would just repeat them,
so in this case the simpler fix is to add repeats to TrafficGenerator.
If three consecutive trials give negative results, the test fails.

Ticket: csit-3983

Change-Id: I1e8abb2ece5bd457f1e2c0c0634f9d08e2697f12
Signed-off-by: Vratko Polak <[email protected]>
resources/libraries/python/TrafficGenerator.py
resources/libraries/python/model/ExportJson.py
resources/libraries/python/model/ExportResult.py
resources/libraries/robot/performance/performance_utils.robot