diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-08-17 08:36:53 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-08-17 08:41:07 +0100 |
commit | eb9e5bea682f610383cf238820c8044ae66f2a3e (patch) | |
tree | a1fd0d1a0c40269466177907d4356fde5d2d6989 | |
parent | 87e8824086a5bc021b7708d36ad9968a8f1a29f0 (diff) |
Add RFC2544 IXIA latency information
JIRA: YARDSTICK-1385
Change-Id: Icecceaabc0389279a3a7154884c50259f794eb76
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r-- | yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py index 5203ffd9c..05eaba6b4 100644 --- a/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py +++ b/yardstick/network_services/vnf_generic/vnf/tg_rfc2544_ixia.py @@ -60,7 +60,7 @@ class IxiaResourceHelper(ClientResourceHelper): def stop_collect(self): self._terminated.value = 1 - def generate_samples(self, ports, duration, key=None): + def generate_samples(self, ports, duration): stats = self.get_stats() samples = {} @@ -81,14 +81,13 @@ class IxiaResourceHelper(ClientResourceHelper): "RxThroughput": int(stats["Valid_Frames_Rx"][port_num]) / duration, "TxThroughput": int(stats["Frames_Tx"][port_num]) / duration, } - if key: - avg_latency = stats["Store-Forward_Avg_latency_ns"][port_num] - min_latency = stats["Store-Forward_Min_latency_ns"][port_num] - max_latency = stats["Store-Forward_Max_latency_ns"][port_num] - samples[port_name][key] = \ - {"Store-Forward_Avg_latency_ns": avg_latency, - "Store-Forward_Min_latency_ns": min_latency, - "Store-Forward_Max_latency_ns": max_latency} + avg_latency = stats["Store-Forward_Avg_latency_ns"][port_num] + min_latency = stats["Store-Forward_Min_latency_ns"][port_num] + max_latency = stats["Store-Forward_Max_latency_ns"][port_num] + samples[port_name] = { + "Store-Forward_Avg_latency_ns": avg_latency, + "Store-Forward_Min_latency_ns": min_latency, + "Store-Forward_Max_latency_ns": max_latency} except IndexError: pass |