From: Martin Klozik Date: Fri, 15 Sep 2017 13:57:35 +0000 (+0100) Subject: trex: Enforce 10 iterations for RFC2544 tput X-Git-Tag: opnfv-5.0.RC1~7^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F42071%2F1;p=vswitchperf.git 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 --- 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",