summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2015-10-15 01:28:55 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-10-23 13:57:48 +0000
commit52eacb37b9e6d11174c23bd053f7ad42b1581dd3 (patch)
treec0f4ada7ac16daf80892b3bcbc72864648801791
parentc2971871dd1380b88d58f29211a3e8478aca477a (diff)
Simple performance Test for the PVP and PVVP
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>
-rwxr-xr-xconf/01_testcases.conf23
-rw-r--r--testcases/testcase.py7
-rwxr-xr-xtools/pkt_gen/dummy/dummy.py7
-rwxr-xr-xtools/pkt_gen/ixia/ixia.py15
-rwxr-xr-xtools/pkt_gen/ixnet/ixnet.py10
-rwxr-xr-xtools/pkt_gen/trafficgen/trafficgen.py13
6 files changed, 48 insertions, 27 deletions
diff --git a/conf/01_testcases.conf b/conf/01_testcases.conf
index 88001459..a35c395e 100755
--- a/conf/01_testcases.conf
+++ b/conf/01_testcases.conf
@@ -37,6 +37,10 @@
# # "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",
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 78f65239..608a316b 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -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
diff --git a/tools/pkt_gen/dummy/dummy.py b/tools/pkt_gen/dummy/dummy.py
index f9ad1c8c..bf5a8f3c 100755
--- a/tools/pkt_gen/dummy/dummy.py
+++ b/tools/pkt_gen/dummy/dummy.py
@@ -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'))
diff --git a/tools/pkt_gen/ixia/ixia.py b/tools/pkt_gen/ixia/ixia.py
index 992aff32..3a4f8442 100755
--- a/tools/pkt_gen/ixia/ixia.py
+++ b/tools/pkt_gen/ixia/ixia.py
@@ -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 = {}
diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py
index 866a803e..52300b1e 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -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)
diff --git a/tools/pkt_gen/trafficgen/trafficgen.py b/tools/pkt_gen/trafficgen/trafficgen.py
index 37f6c095..ff4aca0a 100755
--- a/tools/pkt_gen/trafficgen/trafficgen.py
+++ b/tools/pkt_gen/trafficgen/trafficgen.py
@@ -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``