aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/traffic_profile/rfc2544.py
diff options
context:
space:
mode:
authorOleksandr Naumets <oleksandrx.naumets@intel.com>2019-02-12 18:40:26 +0000
committerOleksandr Naumets <oleksandrx.naumets@intel.com>2019-02-12 18:40:26 +0000
commit0cce2819d798b5365d15dc174f6b4e6d06c18fbf (patch)
treebbcca77cef8b8a96bafa07d6a91def91dbe7111c /yardstick/network_services/traffic_profile/rfc2544.py
parent0dbd3bb46b6d2aaa71c6bf2be046c3c0f877466b (diff)
Extend TRex RFC2544 test case collected stats
Added new fields into Yardstick NSB TRex RFC2544 test case results: - Iteration - PktSize - Status JIRA: YARDSTICK-1592 Change-Id: Id746b537a0ef55a891653719cc1db29ef7e994fc Signed-off-by: Oleksandr Naumets <oleksandrx.naumets@intel.com>
Diffstat (limited to 'yardstick/network_services/traffic_profile/rfc2544.py')
-rw-r--r--yardstick/network_services/traffic_profile/rfc2544.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/yardstick/network_services/traffic_profile/rfc2544.py b/yardstick/network_services/traffic_profile/rfc2544.py
index b838bf814..4225f31b7 100644
--- a/yardstick/network_services/traffic_profile/rfc2544.py
+++ b/yardstick/network_services/traffic_profile/rfc2544.py
@@ -72,10 +72,13 @@ class RFC2544Profile(trex_traffic_profile.TrexProfile):
"""TRex RFC2544 traffic profile"""
TOLERANCE_LIMIT = 0.01
+ STATUS_SUCCESS = "Success"
+ STATUS_FAIL = "Failure"
def __init__(self, traffic_generator):
super(RFC2544Profile, self).__init__(traffic_generator)
self.generator = None
+ self.iteration = 0
self.rate = self.config.frame_rate
self.max_rate = self.config.frame_rate
self.min_rate = 0
@@ -126,6 +129,7 @@ class RFC2544Profile(trex_traffic_profile.TrexProfile):
self.generator.client.start(ports=ports,
duration=self.config.duration,
force=True)
+ self.iteration = self.generator.rfc2544_helper.iteration.value
return ports, port_pg_id
def _create_profile(self, profile_data, rate, port_pg_id, enable_latency):
@@ -274,6 +278,7 @@ class RFC2544Profile(trex_traffic_profile.TrexProfile):
correlated_traffic, resolution):
"""Calculate the drop percentage and run the traffic"""
completed = False
+ status = self.STATUS_FAIL
out_pkt_end = sum(port['out_packets'] for port in samples[-1].values())
in_pkt_end = sum(port['in_packets'] for port in samples[-1].values())
out_pkt_ini = sum(port['out_packets'] for port in samples[0].values())
@@ -304,6 +309,7 @@ class RFC2544Profile(trex_traffic_profile.TrexProfile):
elif drop_percent < tol_low:
self.min_rate = self.rate
else:
+ status = self.STATUS_SUCCESS
completed = True
last_rate = self.rate
@@ -332,6 +338,9 @@ class RFC2544Profile(trex_traffic_profile.TrexProfile):
'Throughput': throughput,
'DropPercentage': self.drop_percent_max,
'Rate': last_rate,
- 'Latency': latency
+ 'Latency': latency,
+ 'PktSize': self._get_framesize(),
+ 'Iteration': self.iteration,
+ 'Status': status
}
return completed, output