aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile/ixia_rfc2544.py
diff options
context:
space:
mode:
authorMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-08-20 20:16:36 +0100
committerMytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>2018-10-30 15:53:49 +0000
commit0ff5b131fa3f93f8d47b46c2f13661c5b88d37a1 (patch)
tree63a98b57a811fe38d95fc999d9fdf3b4c1378076 /yardstick/network_services/traffic_profile/ixia_rfc2544.py
parenta5021a12cdce9f68ff15eb0f1d8d30204081bacc (diff)
Add RFC2544 iteration status field
Added new RFC2544 iteration status field into the testcase result to be able to exctract the best RX/TX throughput value from each iteration. The field equal "Success" if the trhoughput value is in the given drop percentage range and "Failure" otherwise. JIRA: YARDSTICK-1389 Change-Id: I2fb2ef036b63a0e7bbf3d6c6568d3bdffa488e1f Signed-off-by: Mytnyk, Volodymyr <volodymyrx.mytnyk@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile/ixia_rfc2544.py')
-rw-r--r--yardstick/network_services/traffic_profile/ixia_rfc2544.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/ixia_rfc2544.py b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index b8aa78d80..0b7a78c2c 100644
--- a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
+++ b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
@@ -28,6 +28,8 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
DOWNLINK = 'downlink'
DROP_PERCENT_ROUND = 6
RATE_ROUND = 5
+ STATUS_SUCCESS = "Success"
+ STATUS_FAIL = "Failure"
def __init__(self, yaml_data):
super(IXIARFC2544Profile, self).__init__(yaml_data)
@@ -174,7 +176,7 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
self._ixia_traffic_generate(traffic, ixia_obj)
return first_run
- def get_drop_percentage(self, samples, tol_min, tolerance,
+ def get_drop_percentage(self, samples, tol_min, tolerance, precision,
first_run=False):
completed = False
drop_percent = 100
@@ -208,6 +210,10 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
else:
completed = True
+ LOG.debug("tolerance=%s, tolerance_precision=%s drop_percent=%s "
+ "completed=%s", tolerance, precision, drop_percent,
+ completed)
+
latency_ns_avg = float(
sum([samples[iface]['Store-Forward_Avg_latency_ns']
for iface in samples])) / num_ifaces
@@ -218,6 +224,10 @@ class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
sum([samples[iface]['Store-Forward_Max_latency_ns']
for iface in samples])) / num_ifaces
+ samples['Status'] = self.STATUS_FAIL
+ if round(drop_percent, precision) <= tolerance:
+ samples['Status'] = self.STATUS_SUCCESS
+
samples['TxThroughput'] = tx_throughput
samples['RxThroughput'] = rx_throughput
samples['DropPercentage'] = drop_percent