diff options
author | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-08-13 11:00:00 +0100 |
---|---|---|
committer | Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com> | 2018-08-16 11:36:45 +0100 |
commit | 30bb35b84c417fe6ef15deccea780431adb815de (patch) | |
tree | ba92b4cc7f2534e0e46791c29f65a07b629995a9 /yardstick/network_services/traffic_profile | |
parent | 27419ca8e790aa5105dda11b013636c5d1ad8e18 (diff) |
Improve IXIA TG Rx/TX throughput calculation
Use float instead of integer to convert TG throughtput
IXIA statistic.
JIRA: YARDSTICK-1378
Change-Id: I39bd143adc4b10035c6f0986a06d407a18aa0887
Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile')
-rw-r--r-- | yardstick/network_services/traffic_profile/ixia_rfc2544.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py index 2086273e6..241fd7598 100644 --- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -167,12 +167,8 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile): [samples[iface]['in_packets'] for iface in samples]) out_packets_sum = sum( [samples[iface]['out_packets'] for iface in samples]) - rx_throughput = sum( - [samples[iface]['RxThroughput'] for iface in samples]) - rx_throughput = round(float(rx_throughput), 2) - tx_throughput = sum( - [samples[iface]['TxThroughput'] for iface in samples]) - tx_throughput = round(float(tx_throughput), 2) + rx_throughput = round(float(in_packets_sum) / duration, 3) + tx_throughput = round(float(out_packets_sum) / duration, 3) packet_drop = abs(out_packets_sum - in_packets_sum) try: |