Code Review
/
yardstick.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Adding new test case for prox Standalone L3FWD."
[yardstick.git]
/
yardstick
/
network_services
/
traffic_profile
/
ixia_rfc2544.py
diff --git
a/yardstick/network_services/traffic_profile/ixia_rfc2544.py
b/yardstick/network_services/traffic_profile/ixia_rfc2544.py
index
b8aa78d
..
83d24a4
100644
(file)
--- 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
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)
def __init__(self, yaml_data):
super(IXIARFC2544Profile, self).__init__(yaml_data)
@@
-111,6
+113,7
@@
class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
'dstmask': dstmask,
'type': key,
'proto': outer_l3.get('proto'),
'dstmask': dstmask,
'type': key,
'proto': outer_l3.get('proto'),
+ 'priority': outer_l3.get('priority')
})
outer_l4 = value.get('outer_l4')
})
outer_l4 = value.get('outer_l4')
@@
-174,7
+177,7
@@
class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
self._ixia_traffic_generate(traffic, ixia_obj)
return first_run
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
first_run=False):
completed = False
drop_percent = 100
@@
-208,6
+211,10
@@
class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
else:
completed = True
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
latency_ns_avg = float(
sum([samples[iface]['Store-Forward_Avg_latency_ns']
for iface in samples])) / num_ifaces
@@
-218,6
+225,10
@@
class IXIARFC2544Profile(trex_traffic_profile.TrexProfile):
sum([samples[iface]['Store-Forward_Max_latency_ns']
for iface in samples])) / num_ifaces
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
samples['TxThroughput'] = tx_throughput
samples['RxThroughput'] = rx_throughput
samples['DropPercentage'] = drop_percent