From 211eb7443e6cdc66c9657399be983184cd16bba7 Mon Sep 17 00:00:00 2001 From: Radek Zetik Date: Mon, 20 Jul 2015 05:33:58 +0100 Subject: [PATCH] Add a simple performance test that sends a continuous stream Implement a simple performance test that sends a continuous stream of traffic to the vSwitch at line rate for 30 seconds and measures the throughput Note: there is issue with calculating of the Tx Fps and Mbps based on the results from the IxNetwork traffic generator. This issue will be fixed in a later patch. JIRA: VSPERF-27 Change-Id: Ic72225888735d33398a602462af159e901fb5957 Signed-off-by: Radek Zetik Reviewed-by: Maryam Tahhan --- conf/01_testcases.conf | 9 +++++++++ core/component_factory.py | 5 ++--- core/traffic_controller_rfc2544.py | 3 +++ docs/NEWS.md | 2 ++ tools/pkt_gen/ixnet/ixnet.py | 4 ++-- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf index f0fe8ad1..7b6c007c 100755 --- a/conf/01_testcases.conf +++ b/conf/01_testcases.conf @@ -55,4 +55,13 @@ PERFORMANCE_TESTS = [ "biDirectional": "False", "Description": "LTD.Throughput.RFC2544.PacketLossRatioFrameModification" }, + { + "Name": "phy2phy_cont", + "Traffic Type": "continuous", + "Collector": "cpu", + "Deployment": "p2p", + "Description": "RFC2544 Phy2Phy Continuous Stream", + "biDirectional": "True", + }, + ] diff --git a/core/component_factory.py b/core/component_factory.py index eb963d6f..c101f5d2 100644 --- a/core/component_factory.py +++ b/core/component_factory.py @@ -38,14 +38,13 @@ def create_traffic(traffic_type, trafficgen_class): traffic_types: 'rfc2544_throughput' - :param traffic_type: Name of traffic type + :param traffic_type: Name of traffic type :param trafficgen_class: Reference to traffic generator class to be used. :return: A new ITrafficController """ - #TODO - full mapping from all traffic_types to - #correct controller class return TrafficControllerRFC2544(trafficgen_class) + def create_vswitch(deployment_scenario, vswitch_class): """Return a new IVSwitchController for the deployment_scenario. diff --git a/core/traffic_controller_rfc2544.py b/core/traffic_controller_rfc2544.py index bcea9568..aae3ef81 100644 --- a/core/traffic_controller_rfc2544.py +++ b/core/traffic_controller_rfc2544.py @@ -86,6 +86,9 @@ class TrafficControllerRFC2544(ITrafficController, IResults): result = self._traffic_gen_class.send_rfc2544_back2back( traffic, trials=int(self._trials), duration=int(get_test_param('rfc2544_duration', 20))) + elif traffic['traffic_type'] == 'continuous': + result = self._traffic_gen_class.send_cont_traffic( + traffic, time=int(get_test_param('rfc2544_duration', 30))) else: result = self._traffic_gen_class.send_rfc2544_throughput( traffic, trials=int(self._trials), diff --git a/docs/NEWS.md b/docs/NEWS.md index 3ca47d6a..892bfabf 100644 --- a/docs/NEWS.md +++ b/docs/NEWS.md @@ -9,6 +9,7 @@ once the community has digested the initial release. ## New +* Performance testing with continuous stream * CentOS7 support * Verified on CentOS7 * Install & Quickstart documentation @@ -19,6 +20,7 @@ once the community has digested the initial release. * Framework support for non-Ixia traffic generators * Framework support for different VNFs * Python3 +* Support for biDirectional functionality for ixnet interface ## Missing diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py index 58373a19..bb999f70 100755 --- a/tools/pkt_gen/ixnet/ixnet.py +++ b/tools/pkt_gen/ixnet/ixnet.py @@ -200,7 +200,7 @@ class IxNet(trafficgen.ITrafficGenerator): """ pass - def send_cont_traffic(self, traffic=None, time=20, framerate=0, + def send_cont_traffic(self, traffic=None, time=30, framerate=100, multistream=False): """See ITrafficGenerator for description """ @@ -208,7 +208,7 @@ class IxNet(trafficgen.ITrafficGenerator): return self.stop_cont_traffic() - def start_cont_traffic(self, traffic=None, time=20, framerate=0, + def start_cont_traffic(self, traffic=None, time=30, framerate=100, multistream=False): """Start transmission. """ -- 2.16.6