Simple performance Test for the PVP and PVVP 87/2587/4
authorMartin Klozik <martinx.klozik@intel.com>
Thu, 15 Oct 2015 00:28:55 +0000 (01:28 +0100)
committerMaryam Tahhan <maryam.tahhan@intel.com>
Fri, 23 Oct 2015 13:57:48 +0000 (13:57 +0000)
Two sample contionous stream testcaes were introduced for PVP and PVVP
scenarios. Required frame rate percentage can be specified either by
tetcase configuration option "iLoad" or by command line option "iload".
Command line option take precendece to testcase option. By default 100%
linerate is used if not specified otherwise.

Change-Id: I95f7ae6081377a4c99ce70fc7504b6b542f9260b
JIRA: VSPERF-95
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Gene Snider <eugene.snider@huawei.com>
Reviewed-by: Al Morton <acmorton@att.com>
conf/01_testcases.conf
testcases/testcase.py
tools/pkt_gen/dummy/dummy.py
tools/pkt_gen/ixia/ixia.py
tools/pkt_gen/ixnet/ixnet.py
tools/pkt_gen/trafficgen/trafficgen.py

index 8800145..a35c395 100755 (executable)
 #                                  #    "port" - flow is defined by ingress ports
 #                                  #    "IP"   - flow is defined by ingress ports
 #                                  #             and src and dst IP addresses
+# "iLoad": 0-100                   # Optional. Defines desired percentage
+#                                  # of frame rate used during continuous stream
+#                                  # tests. Can be overridden by cli option
+#                                  # iload.
 # "Load": dictionary               # Optional. Configures background load
 #                                  # during testcase execution.
 #   Description of "Load" dictionary keys, their meanings and available values:
@@ -96,8 +100,25 @@ PERFORMANCE_TESTS = [
         "Name": "phy2phy_cont",
         "Traffic Type": "continuous",
         "Deployment": "p2p",
-        "Description": "RFC2544 Phy2Phy Continuous Stream",
+        "Description": "Phy2Phy Continuous Stream",
         "biDirectional": "True",
+        "iLoad": "90",
+    },
+    {
+        "Name": "pvp_cont",
+        "Traffic Type": "continuous",
+        "Deployment": "pvp",
+        "Description": "PVP Continuous Stream",
+        "biDirectional": "True",
+        "iLoad": "90",
+    },
+    {
+        "Name": "pvvp_cont",
+        "Traffic Type": "continuous",
+        "Deployment": "pvvp",
+        "Description": "PVVP Continuous Stream",
+        "biDirectional": "True",
+        "iLoad": "90",
     },
     {
         "Name": "phy2phy_scalability",
index 78f6523..608a316 100644 (file)
@@ -25,6 +25,7 @@ from core.loader import Loader
 from tools.report import report
 from conf import settings as S
 from tools.pkt_gen.trafficgen.trafficgenhelper import TRAFFIC_DEFAULTS
+from conf import get_test_param
 
 class TestCase(object):
     """TestCase base class
@@ -44,6 +45,9 @@ class TestCase(object):
         self.desc = cfg.get('Description', 'No description given.')
         self.deployment = cfg['Deployment']
         self._frame_mod = cfg.get('Frame Modification', None)
+        framerate = get_test_param('iload', None)
+        if framerate == None:
+            framerate = cfg.get('iLoad', 100)
 
         # check if test requires background load and which generator it uses
         self._load_cfg = cfg.get('Load', None)
@@ -62,7 +66,8 @@ class TestCase(object):
         self._traffic.update({'traffic_type': cfg['Traffic Type'],
                               'flow_type': cfg.get('Flow Type', 'port'),
                               'bidir': cfg['biDirectional'],
-                              'multistream': cfg.get('MultiStream', 0)})
+                              'multistream': cfg.get('MultiStream', 0),
+                              'frame_rate': int(framerate)})
 
     def run(self):
         """Run the test
index f9ad1c8..bf5a8f3 100755 (executable)
@@ -104,7 +104,7 @@ class Dummy(trafficgen.ITrafficGenerator):
         """
         pass
 
-    def send_burst_traffic(self, traffic=None, numpkts=100, time=20, framerate=100):
+    def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
         """
         Send a burst of traffic.
         """
@@ -133,8 +133,7 @@ class Dummy(trafficgen.ITrafficGenerator):
 
         return trafficgen.BurstResult(*results)
 
-    def send_cont_traffic(self, traffic=None, time=20, framerate=0,
-                          multistream=False):
+    def send_cont_traffic(self, traffic=None, time=20, multistream=False):
         """
         Send a continuous flow of traffic.
         """
@@ -146,7 +145,7 @@ class Dummy(trafficgen.ITrafficGenerator):
 
         results = get_user_traffic(
             'continuous',
-            '%dmS, %dmpps, multistream %s' % (time, framerate,
+            '%dmS, %dmpps, multistream %s' % (time, traffic['frame_rate'],
                                               multistream), traffic_,
             ('frames tx', 'frames rx', 'min latency', 'max latency',
              'avg latency'))
index 992aff3..3a4f844 100755 (executable)
@@ -211,15 +211,14 @@ class Ixia(trafficgen.ITrafficGenerator):
 
         return result
 
-    def send_burst_traffic(self, traffic=None, numpkts=100, time=20,
-                           framerate=100):
+    def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
         """See ITrafficGenerator for description
         """
         flow = {
             'numpkts': numpkts,
             'time': time,
             'type': 'stopStream',
-            'framerate': framerate,
+            'framerate': traffic['frame_rate'],
         }
 
         result = self._send_traffic(flow, traffic)
@@ -228,14 +227,14 @@ class Ixia(trafficgen.ITrafficGenerator):
 
         #TODO - implement Burst results setting via TrafficgenResults.
 
-    def send_cont_traffic(self, traffic=None, time=20, framerate=100):
+    def send_cont_traffic(self, traffic=None, time=20, multistream=False):
         """See ITrafficGenerator for description
         """
         flow = {
             'numpkts': 100,
             'time': time,
             'type': 'contPacket',
-            'framerate': framerate,
+            'framerate': traffic['frame_rate'],
             'multipleStreams': traffic['multistream'],
         }
 
@@ -243,10 +242,10 @@ class Ixia(trafficgen.ITrafficGenerator):
 
         return Ixia._create_result(result)
 
-    def start_cont_traffic(self, traffic=None, time=20, framerate=100):
+    def start_cont_traffic(self, traffic=None, time=20):
         """See ITrafficGenerator for description
         """
-        return self.send_cont_traffic(traffic, 0, framerate)
+        return self.send_cont_traffic(traffic, 0)
 
     def stop_cont_traffic(self):
         """See ITrafficGenerator for description
@@ -254,7 +253,7 @@ class Ixia(trafficgen.ITrafficGenerator):
         return self.run_tcl('stopTraffic')
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0):
+                                lossrate=0.0, multistream=False):
         """See ITrafficGenerator for description
         """
         params = {}
index 866a803..52300b1 100755 (executable)
@@ -200,14 +200,14 @@ class IxNet(trafficgen.ITrafficGenerator):
         """
         pass
 
-    def send_cont_traffic(self, traffic=None, time=30, framerate=100):
+    def send_cont_traffic(self, traffic=None, time=30, multistream=False):
         """See ITrafficGenerator for description
         """
-        self.start_cont_traffic(traffic, time, framerate)
+        self.start_cont_traffic(traffic, time)
 
         return self.stop_cont_traffic()
 
-    def start_cont_traffic(self, traffic=None, time=30, framerate=100):
+    def start_cont_traffic(self, traffic=None, time=30):
         """Start transmission.
         """
         self._bidir = traffic['bidir']
@@ -216,7 +216,7 @@ class IxNet(trafficgen.ITrafficGenerator):
         self._params['config'] = {
             'binary': False,  # don't do binary search and send one stream
             'time': time,
-            'framerate': framerate,
+            'framerate': traffic['frame_rate'],
             'multipleStreams': traffic['multistream'],
             'rfc2544TestType': 'throughput',
         }
@@ -251,7 +251,7 @@ class IxNet(trafficgen.ITrafficGenerator):
         return self._wait_result()
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0):
+                                lossrate=0.0, multistream=False):
         """See ITrafficGenerator for description
         """
         self.start_rfc2544_throughput(traffic, trials, duration, lossrate)
index 37f6c09..ff4aca0 100755 (executable)
@@ -79,8 +79,7 @@ class ITrafficGenerator(object):
         """
         raise NotImplementedError('Please call an implementation.')
 
-    def send_burst_traffic(self, traffic=None, numpkts=100,
-                           time=20, framerate=100):
+    def send_burst_traffic(self, traffic=None, numpkts=100, time=20):
         """Send a burst of traffic.
 
         Send a ``numpkts`` packets of traffic, using ``traffic``
@@ -89,7 +88,6 @@ class ITrafficGenerator(object):
         Attributes:
         :param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
         :param numpkts: Number of packets to send
-        :param framerate: Expected framerate
         :param time: Time to wait to receive packets
 
         :returns: dictionary of strings with following data:
@@ -101,15 +99,14 @@ class ITrafficGenerator(object):
         """
         raise NotImplementedError('Please call an implementation.')
 
-    def send_cont_traffic(self, traffic=None, time=20, framerate=0):
+    def send_cont_traffic(self, traffic=None, time=20, multistream=False):
         """Send a continuous flow of traffic.
 
-        Send packets at ``framerate``, using ``traffic`` configuration,
+        Send packets at given framerate, using ``traffic`` configuration,
         until timeout ``time`` occurs.
 
         :param traffic: Detailed "traffic" spec, i.e. IP address, VLAN tags
         :param time: Time to wait to receive packets (secs)
-        :param framerate: Expected framerate
         :param multistream: Enable multistream output by overriding the
                         UDP port number in ``traffic`` with values
                         from 1 to 64,000
@@ -126,7 +123,7 @@ class ITrafficGenerator(object):
         """
         raise NotImplementedError('Please call an implementation.')
 
-    def start_cont_traffic(self, traffic=None, time=20, framerate=0):
+    def start_cont_traffic(self, traffic=None, time=20):
         """Non-blocking version of 'send_cont_traffic'.
 
         Start transmission and immediately return. Do not wait for
@@ -140,7 +137,7 @@ class ITrafficGenerator(object):
         raise NotImplementedError('Please call an implementation.')
 
     def send_rfc2544_throughput(self, traffic=None, trials=3, duration=20,
-                                lossrate=0.0):
+                                lossrate=0.0, multistream=False):
         """Send traffic per RFC2544 throughput test specifications.
 
         Send packets at a variable rate, using ``traffic``