diff options
author | 2018-08-23 09:46:02 +0000 | |
---|---|---|
committer | 2018-08-23 09:46:02 +0000 | |
commit | 057652b25f68dd4720dbc40e7919237d3888fb12 (patch) | |
tree | 28850f7418c10a6f11af74e41a7483620d1961bd /yardstick/network_services/traffic_profile/ixia_rfc2544.py | |
parent | c6175b5bc59706c3a423fe2781f99e32930bb570 (diff) | |
parent | c2b39e3413a666c9e623a51d4454ee9f7965a4d7 (diff) |
Merge "Provide average latency results in IXIA KPIs"
Diffstat (limited to 'yardstick/network_services/traffic_profile/ixia_rfc2544.py')
-rw-r--r-- | yardstick/network_services/traffic_profile/ixia_rfc2544.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py index 760b1e8d3..f07973304 100644 --- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py +++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py @@ -179,10 +179,6 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile): except ZeroDivisionError: LOG.info('No traffic is flowing') - samples['TxThroughput'] = tx_throughput - samples['RxThroughput'] = rx_throughput - samples['DropPercentage'] = drop_percent - if first_run: completed = True if drop_percent <= tolerance else False if (first_run and @@ -196,4 +192,21 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile): else: completed = True + latency_ns_avg = float( + sum([samples[iface]['Store-Forward_Avg_latency_ns'] + for iface in samples])) / num_ifaces + latency_ns_min = float( + sum([samples[iface]['Store-Forward_Min_latency_ns'] + for iface in samples])) / num_ifaces + latency_ns_max = float( + sum([samples[iface]['Store-Forward_Max_latency_ns'] + for iface in samples])) / num_ifaces + + samples['TxThroughput'] = tx_throughput + samples['RxThroughput'] = rx_throughput + samples['DropPercentage'] = drop_percent + samples['latency_ns_avg'] = latency_ns_avg + samples['latency_ns_min'] = latency_ns_min + samples['latency_ns_max'] = latency_ns_max + return completed, samples |