X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=nfvbench%2Ftraffic_client.py;h=c349289fe1f5a622fdd8664e8d58848e2ca94c3d;hb=8755c892f6cfbfb8ca4f3405675dfe770c769605;hp=ae8af8da912696fd653a96f932035eedac7f931d;hpb=c3e9d0fc0076f0a2930f13366255b0e8e65fb814;p=nfvbench.git diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py index ae8af8d..c349289 100755 --- a/nfvbench/traffic_client.py +++ b/nfvbench/traffic_client.py @@ -1069,6 +1069,9 @@ class TrafficClient(object): 'theoretical_tx_rate_bps': stats['theoretical_tx_rate_bps'], 'theoretical_tx_rate_pps': stats['theoretical_tx_rate_pps']} + if self.config.periodic_gratuitous_arp: + retDict['garp_total_tx_rate'] = stats['garp_total_tx_rate'] + tx_keys = ['total_pkts', 'total_pkt_bytes', 'pkt_rate', 'pkt_bit_rate'] rx_keys = tx_keys + ['dropped_pkts'] @@ -1367,12 +1370,25 @@ class TrafficClient(object): for idx, key in enumerate(["direction-forward", "direction-reverse"]): tx_rate = results["stats"][str(idx)]["tx"]["total_pkts"] / self.config.duration_sec rx_rate = results["stats"][str(1 - idx)]["rx"]["total_pkts"] / self.config.duration_sec + + orig_rate = self.run_config['rates'][idx] + if self.config.periodic_gratuitous_arp: + orig_rate['rate_pps'] = float( + orig_rate['rate_pps']) - self.config.gratuitous_arp_pps + r[key] = { - "orig": self.__convert_rates(self.run_config['rates'][idx]), + "orig": self.__convert_rates(orig_rate), "tx": self.__convert_rates({'rate_pps': tx_rate}), "rx": self.__convert_rates({'rate_pps': rx_rate}) } + if self.config.periodic_gratuitous_arp: + r['garp-direction-total'] = { + "orig": self.__convert_rates({'rate_pps': self.config.gratuitous_arp_pps * 2}), + "tx": self.__convert_rates({'rate_pps': results["stats"]["garp_total_tx_rate"]}), + "rx": self.__convert_rates({'rate_pps': 0}) + } + total = {} for direction in ['orig', 'tx', 'rx']: total[direction] = {} @@ -1380,6 +1396,7 @@ class TrafficClient(object): total[direction][unit] = sum([float(x[direction][unit]) for x in list(r.values())]) r['direction-total'] = total + return r def insert_interface_stats(self, pps_list):