aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services
diff options
context:
space:
mode:
authorVolodymyr Mytnyk <volodymyrx.mytnyk@intel.com>2019-02-11 16:43:18 +0000
committerGerrit Code Review <gerrit@opnfv.org>2019-02-11 16:43:18 +0000
commitfa0c26a8af32e98a8486772e3a98b6185d68edba (patch)
tree5f20e8cd54e671df1e10c079358a71e08ec9a632 /yardstick/tests/unit/network_services
parentda8b4002029522c712c298a256b15e75bf3171a3 (diff)
parent4d000298119c0de055e012e27e76f54327df2251 (diff)
Merge "Add IXIA Tx/Rx Bytes stats into results"
Diffstat (limited to 'yardstick/tests/unit/network_services')
-rw-r--r--yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py26
-rw-r--r--yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py10
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py22
3 files changed, 58 insertions, 0 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
index 169e47a28..7b5165c39 100644
--- a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
+++ b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
@@ -630,11 +630,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
def test_get_drop_percentage_completed(self):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 23,
'Store-Forward_Min_latency_ns': 13,
'Store-Forward_Max_latency_ns': 28}
@@ -658,11 +660,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
def test_get_drop_percentage_over_drop_percentage(self):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -681,11 +685,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
def test_get_drop_percentage_under_drop_percentage(self):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -705,11 +711,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
def test_get_drop_percentage_not_flow(self, *args):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 0,
+ 'in_bytes': 64000, 'out_bytes': 0,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 0,
+ 'in_bytes': 64320, 'out_bytes': 0,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -728,11 +736,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
def test_get_drop_percentage_first_run(self):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -752,11 +762,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
rfc2544_profile._get_next_rate = mock.Mock(return_value=0.1)
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -768,11 +780,13 @@ class TestIXIARFC2544Profile(unittest.TestCase):
samples = {'iface_name_1':
{'in_packets': 1000, 'out_packets': 1000,
+ 'in_bytes': 64000, 'out_bytes': 64000,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25},
'iface_name_2':
{'in_packets': 1005, 'out_packets': 1007,
+ 'in_bytes': 64320, 'out_bytes': 64448,
'Store-Forward_Avg_latency_ns': 20,
'Store-Forward_Min_latency_ns': 15,
'Store-Forward_Max_latency_ns': 25}
@@ -899,12 +913,16 @@ class TestIXIARFC2544PppoeScenarioProfile(unittest.TestCase):
'0': {
'in_packets': 100,
'out_packets': 100,
+ 'in_bytes': 6400,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10}},
'xe0': {
'in_packets': 100,
'out_packets': 100,
+ 'in_bytes': 6400,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10}}
@@ -937,12 +955,16 @@ class TestIXIARFC2544PppoeScenarioProfile(unittest.TestCase):
'0': {
'in_packets': 90,
'out_packets': 100,
+ 'in_bytes': 5760,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10}},
'xe0': {
'in_packets': 90,
'out_packets': 100,
+ 'in_bytes': 5760,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10}}
@@ -972,12 +994,16 @@ class TestIXIARFC2544PppoeScenarioProfile(unittest.TestCase):
'0': {
'in_packets': 100,
'out_packets': 100,
+ 'in_bytes': 6400,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10}},
'xe0': {
'in_packets': 90,
'out_packets': 100,
+ 'in_bytes': 5760,
+ 'out_bytes': 6400,
'Store-Forward_Avg_latency_ns': 10,
'Store-Forward_Min_latency_ns': 10,
'Store-Forward_Max_latency_ns': 10
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
index fdcd36f0e..c72a72d3d 100644
--- a/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
+++ b/yardstick/tests/unit/network_services/traffic_profile/test_rfc2544.py
@@ -255,22 +255,30 @@ class TestRFC2544Profile(base.BaseUnitTestCase):
'rx_throughput_fps': 101,
'out_packets': 2100,
'in_packets': 2010,
+ 'out_bytes': 134400,
+ 'in_bytes': 128640,
'timestamp': datetime.datetime(2000, 1, 1, 1, 1, 1, 1)},
'xe2': {'tx_throughput_fps': 210,
'rx_throughput_fps': 201,
'out_packets': 4100,
'in_packets': 4010,
+ 'out_bytes': 262400,
+ 'in_bytes': 256640,
'timestamp': datetime.datetime(2000, 1, 1, 1, 1, 1, 1)}},
{'xe1': {'tx_throughput_fps': 156,
'rx_throughput_fps': 108,
'out_packets': 2110,
'in_packets': 2040,
+ 'out_bytes': 135040,
+ 'in_bytes': 130560,
'latency': 'Latency1',
'timestamp': datetime.datetime(2000, 1, 1, 1, 1, 1, 31)},
'xe2': {'tx_throughput_fps': 253,
'rx_throughput_fps': 215,
'out_packets': 4150,
'in_packets': 4010,
+ 'out_bytes': 265600,
+ 'in_bytes': 256640,
'latency': 'Latency2',
'timestamp': datetime.datetime(2000, 1, 1, 1, 1, 1, 31)}}
]
@@ -280,6 +288,8 @@ class TestRFC2544Profile(base.BaseUnitTestCase):
'Latency': {'xe1': 'Latency1', 'xe2': 'Latency2'},
'RxThroughput': 1000000.0,
'TxThroughput': 2000000.0,
+ 'RxThroughputBps': 64000000.0,
+ 'TxThroughputBps': 128000000.0,
'CurrentDropPercentage': 50.0,
'Rate': 100.0,
'Throughput': 1000000.0}
diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
index e1bbff79b..d84fda789 100644
--- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
+++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
@@ -502,6 +502,8 @@ class TestIxiaBasicScenario(unittest.TestCase):
'Valid_Frames_Rx': ['150', '150'],
'Frames_Tx_Rate': ['0.0', '0.0'],
'Valid_Frames_Rx_Rate': ['0.0', '0.0'],
+ 'Bytes_Rx': ['9600', '9600'],
+ 'Bytes_Tx': ['9600', '9600'],
'Tx_Rate_Kbps': ['0.0', '0.0'],
'Rx_Rate_Mbps': ['0.0', '0.0'],
'Tx_Rate_Mbps': ['0.0', '0.0'],
@@ -556,10 +558,14 @@ class TestIxiaBasicScenario(unittest.TestCase):
expected_samples = {'xe0': {
'in_packets': 150,
'out_packets': 150,
+ 'in_bytes': 9600,
+ 'out_bytes': 9600,
'rx_throughput_mbps': 0.0,
'rx_throughput_kps': 0.0,
'RxThroughput': 5.0,
'TxThroughput': 5.0,
+ 'RxThroughputBps': 320.0,
+ 'TxThroughputBps': 320.0,
'tx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,
'Store-Forward_Max_latency_ns': 100,
@@ -568,10 +574,14 @@ class TestIxiaBasicScenario(unittest.TestCase):
'xe1': {
'in_packets': 150,
'out_packets': 150,
+ 'in_bytes': 9600,
+ 'out_bytes': 9600,
'rx_throughput_mbps': 0.0,
'rx_throughput_kps': 0.0,
'RxThroughput': 5.0,
'TxThroughput': 5.0,
+ 'RxThroughputBps': 320.0,
+ 'TxThroughputBps': 320.0,
'tx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,
'Store-Forward_Max_latency_ns': 200,
@@ -1174,6 +1184,8 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'port_statistics': [
{'Frames_Tx': '3000',
'Valid_Frames_Rx': '3000',
+ 'Bytes_Rx': '192000',
+ 'Bytes_Tx': '192000',
'Rx_Rate_Kbps': '0.0',
'Tx_Rate_Kbps': '0.0',
'Rx_Rate_Mbps': '0.0',
@@ -1181,6 +1193,8 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'port_name': 'Ethernet - 001'},
{'Frames_Tx': '3000',
'Valid_Frames_Rx': '3000',
+ 'Bytes_Rx': '192000',
+ 'Bytes_Tx': '192000',
'Rx_Rate_Kbps': '0.0',
'Tx_Rate_Kbps': '0.0',
'Rx_Rate_Mbps': '0.0',
@@ -1220,6 +1234,10 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'TxThroughput': 100.0,
'in_packets': 3000,
'out_packets': 3000,
+ 'in_bytes': 192000,
+ 'out_bytes': 192000,
+ 'RxThroughputBps': 6400.0,
+ 'TxThroughputBps': 6400.0,
'rx_throughput_kps': 0.0,
'rx_throughput_mbps': 0.0,
'sessions_down': 0,
@@ -1235,6 +1253,10 @@ class TestIxiaPppoeClientScenario(unittest.TestCase):
'TxThroughput': 100.0,
'in_packets': 3000,
'out_packets': 3000,
+ 'in_bytes': 192000,
+ 'out_bytes': 192000,
+ 'RxThroughputBps': 6400.0,
+ 'TxThroughputBps': 6400.0,
'rx_throughput_kps': 0.0,
'rx_throughput_mbps': 0.0,
'tx_throughput_kps': 0.0,