From 3d26403053022e58a424984c5796a794505c91ec Mon Sep 17 00:00:00 2001 From: Ace Lee Date: Fri, 21 Jul 2017 03:02:04 +0000 Subject: support more parameters in iperf3 testcase JIRA: YARDSTICK-755 The parameters that iperf3 testcase support now maybe insufficient in some usecase. The test case should support parameters such as: windows size and length of buffer. This work is about adding more parameters that can be specified in options section in the YAML file. Change-Id: Ibc81cd1bbbc6fdd492aa67bd3acee7cd310c87ef Signed-off-by: Ace Lee --- yardstick/benchmark/scenarios/networking/iperf3.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/yardstick/benchmark/scenarios/networking/iperf3.py b/yardstick/benchmark/scenarios/networking/iperf3.py index 3135af9bd..a3d273750 100644 --- a/yardstick/benchmark/scenarios/networking/iperf3.py +++ b/yardstick/benchmark/scenarios/networking/iperf3.py @@ -50,6 +50,17 @@ For more info see http://software.es.net/iperf type: int unit: bytes default: - + length - length of buffer to read or write, + (default 128 KB for TCP, 8 KB for UDP) + type: int + unit: k + default: - + window - set window size / socket buffer size + set TCP windows size. for UDP way to test, this will set to accept UDP + packet buffer size, limit the max size of acceptable data packet. + type: int + unit: k + default: - """ __scenario_type__ = "Iperf3" @@ -122,6 +133,12 @@ For more info see http://software.es.net/iperf elif "blockcount" in options: cmd += " --blockcount %d" % options["blockcount"] + if "length" in options: + cmd += " --length %s" % options["length"] + + if "window" in options: + cmd += " --window %s" % options["window"] + LOG.debug("Executing command: %s", cmd) status, stdout, stderr = self.host.execute(cmd) -- cgit 1.2.3-korg