aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests
diff options
context:
space:
mode:
authorSerhiy Pshyk <serhiyx.pshyk@intel.com>2018-08-17 16:35:41 +0100
committerSerhiy Pshyk <serhiyx.pshyk@intel.com>2018-08-23 09:48:53 +0100
commit06f80e44e3dd48164bee99296d5b2888378a317b (patch)
tree9a79d976a0d4f51cdf7b9f6cb36264f23ed9b4d5 /yardstick/tests
parent27521123b2a178ce5d9038a4901e65ced0b9e35e (diff)
Fix issues with 'Success_' stats reported by ProxBinSearchProfile
List of changes: - Added 'Status' field to indicate status of each search iteration. Possible values are 'Success', 'Failure', 'Result'. - Removed reporting of duplicated stats with 'Success_' prefix. Instead 'Status' field is set to 'Success' - Removed reporting of duplicated stats with 'Result_' prefix. Instead 'Status' field is set to 'Result' - Updated Prox_BM_L2FWD-4Port_MultiSize-1518452496550.json dashboard to query success and result status by 'Status' field value. JIRA: YARDSTICK-1386 Change-Id: I9a21a102af6cb4db137e805011b5d81c4943d77b Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
Diffstat (limited to 'yardstick/tests')
-rw-r--r--yardstick/tests/unit/network_services/traffic_profile/test_prox_binsearch.py131
1 files changed, 70 insertions, 61 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_prox_binsearch.py b/yardstick/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
index c062308e8..c09903377 100644
--- a/yardstick/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
+++ b/yardstick/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
@@ -71,38 +71,43 @@ class TestProxBinSearchProfile(unittest.TestCase):
self.assertEqual(len(runs), 77)
# Result Samples inc theor_max
- result_tuple = {'Result_Actual_throughput': 5e-07,
- 'Result_theor_max_throughput': 7.5e-07,
- 'Result_pktSize': 200}
-
- profile.queue.put.assert_called_with(result_tuple)
-
- success_result_tuple = {"Success_CurrentDropPackets": 0.5,
- "Success_DropPackets": 0.5,
- "Success_LatencyAvg": 5.3,
- "Success_LatencyMax": 5.2,
- "Success_LatencyMin": 5.1,
- "Success_PktSize": 200,
- "Success_RxThroughput": 7.5e-07,
- "Success_Throughput": 7.5e-07,
- "Success_TxThroughput": 0.00012340000000000002}
+ result_tuple = {'Actual_throughput': 5e-07,
+ 'theor_max_throughput': 7.5e-07,
+ 'PktSize': 200,
+ 'Status': 'Result'}
+
+ test_results = profile.queue.put.call_args[0]
+ for k in result_tuple:
+ self.assertEqual(result_tuple[k], test_results[0][k])
+
+ success_result_tuple = {"CurrentDropPackets": 0.5,
+ "DropPackets": 0.5,
+ "LatencyAvg": 5.3,
+ "LatencyMax": 5.2,
+ "LatencyMin": 5.1,
+ "PktSize": 200,
+ "RxThroughput": 7.5e-07,
+ "Throughput": 7.5e-07,
+ "TxThroughput": 0.00012340000000000002,
+ "Status": 'Success'}
calls = profile.queue.put(success_result_tuple)
profile.queue.put.assert_has_calls(calls)
- success_result_tuple2 = {"Success_CurrentDropPackets": 0.5,
- "Success_DropPackets": 0.5,
- "Success_LatencyAvg": 5.3,
- "Success_LatencyMax": 5.2,
- "Success_LatencyMin": 5.1,
- "Success_PktSize": 200,
- "Success_RxThroughput": 7.5e-07,
- "Success_Throughput": 7.5e-07,
- "Success_TxThroughput": 123.4,
- "Success_can_be_lost": 409600,
- "Success_drop_total": 20480,
- "Success_rx_total": 4075520,
- "Success_tx_total": 4096000}
+ success_result_tuple2 = {"CurrentDropPackets": 0.5,
+ "DropPackets": 0.5,
+ "LatencyAvg": 5.3,
+ "LatencyMax": 5.2,
+ "LatencyMin": 5.1,
+ "PktSize": 200,
+ "RxThroughput": 7.5e-07,
+ "Throughput": 7.5e-07,
+ "TxThroughput": 123.4,
+ "can_be_lost": 409600,
+ "drop_total": 20480,
+ "rx_total": 4075520,
+ "tx_total": 4096000,
+ "Status": 'Success'}
calls = profile.queue.put(success_result_tuple2)
profile.queue.put.assert_has_calls(calls)
@@ -183,17 +188,16 @@ class TestProxBinSearchProfile(unittest.TestCase):
# Result Samples
- result_tuple = {'Result_Actual_throughput': 0, "Result_theor_max_throughput": 0,
- "Result_pktSize": 200}
+ result_tuple = {'Actual_throughput': 0, 'theor_max_throughput': 0,
+ "Status": 'Result', "Next_Step": ''}
profile.queue.put.assert_called_with(result_tuple)
# Check for success_ tuple (None expected)
calls = profile.queue.put.mock_calls
for call in calls:
for call_detail in call[1]:
- for k in call_detail:
- if "Success_" in k:
- self.assertRaises(AttributeError)
+ if call_detail["Status"] == 'Success':
+ self.assertRaises(AttributeError)
def test_execute_4(self):
@@ -237,38 +241,43 @@ class TestProxBinSearchProfile(unittest.TestCase):
self.assertEqual(len(runs), 7)
# Result Samples inc theor_max
- result_tuple = {'Result_Actual_throughput': 5e-07,
- 'Result_theor_max_throughput': 7.5e-07,
- 'Result_pktSize': 200}
-
- profile.queue.put.assert_called_with(result_tuple)
-
- success_result_tuple = {"Success_CurrentDropPackets": 0.5,
- "Success_DropPackets": 0.5,
- "Success_LatencyAvg": 5.3,
- "Success_LatencyMax": 5.2,
- "Success_LatencyMin": 5.1,
- "Success_PktSize": 200,
- "Success_RxThroughput": 7.5e-07,
- "Success_Throughput": 7.5e-07,
- "Success_TxThroughput": 0.00012340000000000002}
+ result_tuple = {'Actual_throughput': 5e-07,
+ 'theor_max_throughput': 7.5e-07,
+ 'PktSize': 200,
+ "Status": 'Result'}
+
+ test_results = profile.queue.put.call_args[0]
+ for k in result_tuple:
+ self.assertEqual(result_tuple[k], test_results[0][k])
+
+ success_result_tuple = {"CurrentDropPackets": 0.5,
+ "DropPackets": 0.5,
+ "LatencyAvg": 5.3,
+ "LatencyMax": 5.2,
+ "LatencyMin": 5.1,
+ "PktSize": 200,
+ "RxThroughput": 7.5e-07,
+ "Throughput": 7.5e-07,
+ "TxThroughput": 0.00012340000000000002,
+ "Status": 'Success'}
calls = profile.queue.put(success_result_tuple)
profile.queue.put.assert_has_calls(calls)
- success_result_tuple2 = {"Success_CurrentDropPackets": 0.5,
- "Success_DropPackets": 0.5,
- "Success_LatencyAvg": 5.3,
- "Success_LatencyMax": 5.2,
- "Success_LatencyMin": 5.1,
- "Success_PktSize": 200,
- "Success_RxThroughput": 7.5e-07,
- "Success_Throughput": 7.5e-07,
- "Success_TxThroughput": 123.4,
- "Success_can_be_lost": 409600,
- "Success_drop_total": 20480,
- "Success_rx_total": 4075520,
- "Success_tx_total": 4096000}
+ success_result_tuple2 = {"CurrentDropPackets": 0.5,
+ "DropPackets": 0.5,
+ "LatencyAvg": 5.3,
+ "LatencyMax": 5.2,
+ "LatencyMin": 5.1,
+ "PktSize": 200,
+ "RxThroughput": 7.5e-07,
+ "Throughput": 7.5e-07,
+ "TxThroughput": 123.4,
+ "can_be_lost": 409600,
+ "drop_total": 20480,
+ "rx_total": 4075520,
+ "tx_total": 4096000,
+ "Status": 'Success'}
calls = profile.queue.put(success_result_tuple2)
profile.queue.put.assert_has_calls(calls)