diff options
author | Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com> | 2019-04-08 09:24:31 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-04-08 09:24:31 +0000 |
commit | ff2093ffa0279e91cf09c1f6843c473a0a1ff129 (patch) | |
tree | 1e217511eaeaebb33b000902e74db2323d93cf85 | |
parent | d2f9220dacab0b49563d30d9855f97b358ac507c (diff) | |
parent | 9e1dfbcc3b8d49ae1ea66a1ca6907073c867daab (diff) |
Merge "Fix UDPReplay VNF statistic parsing"
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/udp_replay.py | 4 | ||||
-rw-r--r-- | yardstick/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/udp_replay.py b/yardstick/network_services/vnf_generic/vnf/udp_replay.py index 3f9994486..a3b0b9fd9 100644 --- a/yardstick/network_services/vnf_generic/vnf/udp_replay.py +++ b/yardstick/network_services/vnf_generic/vnf/udp_replay.py @@ -109,7 +109,7 @@ class UdpReplayApproxVnf(SampleVNF): def collect_kpi(self): def get_sum(offset): - return sum(int(i) for i in split_stats[offset::5]) + return sum(int(i) for i in split_stats[offset::6]) # we can't get KPIs if the VNF is down check_if_process_failed(self._vnf_process) @@ -117,7 +117,7 @@ class UdpReplayApproxVnf(SampleVNF): stats = self.get_stats() stats_words = stats.split() - split_stats = stats_words[stats_words.index('0'):][:number_of_ports * 5] + split_stats = stats_words[stats_words.index('arp_pkts') + 1:][:number_of_ports * 6] physical_node = ctx_base.Context.get_physical_node_from_server( self.scenario_helper.nodes[self.name]) diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py index cbb4ee913..aabd402a6 100644 --- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py +++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py @@ -329,9 +329,9 @@ class TestUdpReplayApproxVnf(unittest.TestCase): vnfd = self.VNFD_0 get_stats_ret_val = \ "stats\r\r\n\r\nUDP_Replay stats:\r\n--------------\r\n" \ - "Port\t\tRx Packet\t\tTx Packet\t\tRx Pkt Drop\t\tTx Pkt Drop \r\n"\ - "0\t\t7374156\t\t7374136\t\t\t0\t\t\t0\r\n" \ - "1\t\t7374316\t\t7374315\t\t\t0\t\t\t0\r\n\r\nReplay>\r\r\nReplay>" + "Port\t\tRx Packet\t\tTx Packet\t\tRx Pkt Drop\t\tTx Pkt Drop\t\tarp_pkts \r\n"\ + "0\t\t7374156\t\t7374136\t\t\t0\t\t\t0\t\t\t0\r\n" \ + "1\t\t7374316\t\t7374315\t\t\t0\t\t\t0\t\t\t0\r\n\r\nReplay>\r\r\nReplay>" udp_replay_approx_vnf = UdpReplayApproxVnf(NAME, vnfd) udp_replay_approx_vnf.scenario_helper.scenario_cfg = { 'nodes': {udp_replay_approx_vnf.name: "mock"} |