From 23fd7d08df71d2c4320fc728f5adca8d28782e2e Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 15 Sep 2017 14:57:35 +0100 Subject: trex: Enforce 10 iterations for RFC2544 tput This patch enforces 10 iterations during search for besti RFC2544 Throughput with 0% packet loss. Unless 0% packet loss is detected during first iteration with initial frame rate. JIRA: VSPERF-530 Change-Id: I99e49e9dbf4e1424253d0cfec804819516c00df8 Signed-off-by: Martin Klozik Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper Reviewed-by: Martin Goldammer --- tools/pkt_gen/trex/trex.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/pkt_gen/trex/trex.py b/tools/pkt_gen/trex/trex.py index ae262306..e8ed42f1 100644 --- a/tools/pkt_gen/trex/trex.py +++ b/tools/pkt_gen/trex/trex.py @@ -284,7 +284,9 @@ class Trex(ITrafficGenerator): right = traffic['frame_rate'] center = traffic['frame_rate'] - while num_test <= tests: + # execute 10 iterations to find out best tput with 0% packet loss + # unless 0% packet loss is detected for initial frame_rate + while num_test <= 10: test_lossrate = ((stats["total"]["opackets"] - stats["total"] ["ipackets"]) * 100) / stats["total"]["opackets"] self._logger.debug("Iteration: %s, frame rate: %s, throughput_rx_fps: %s, frame_loss_percent: %s", -- cgit 1.2.3-korg