aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/ixnet
diff options
context:
space:
mode:
authorDino Simeon Madarang <dino.simeonx.madarang@intel.com>2015-06-19 19:45:08 +0100
committerMaryam Tahhan <maryam.tahhan@intel.com>2015-07-07 09:50:45 +0000
commit8859f3b1b81bf2a980a319551300b127be9a0f45 (patch)
tree4ddef787ce19fcdf4d01295aeb042d07b984b07f /tools/pkt_gen/ixnet
parentecc42f3b69e01289415f43ebf88b1f5dfde5e14c (diff)
Port RFC2544.BackToBackFrames test to vsperf
Add RFC2544.BackToBackFrames test and fix pylint errors. Remove irrelevant values of back to back test results. JIRA: VSPERF-46 Change-Id: I7a0dfd9494b509c3be7bffc0678228838d3059a1 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Meghan Halton <meghan.halton@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Radek Zetik <radekx.zetik@intel.com> Reviewed-by: Martin Klozik<martinx.klozik@intel.com> Reviewed-by: Eugene Snider <Eugene.Snider@huawei.com> Reviewed-by: Gurpreet Singh <gurpreet.singh@spirent.com> Reviewed-by: Tv Rao <tv.rao@freescale.com>
Diffstat (limited to 'tools/pkt_gen/ixnet')
-rwxr-xr-xtools/pkt_gen/ixnet/ixnet.py28
1 files changed, 10 insertions, 18 deletions
diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py
index fdea4bfd..5deca8d6 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -186,8 +186,8 @@ class IxNet(trafficgen.ITrafficGenerator):
'card': settings.getValue('TRAFFICGEN_IXIA_CARD'),
'port1': settings.getValue('TRAFFICGEN_IXIA_PORT1'),
'port2': settings.getValue('TRAFFICGEN_IXIA_PORT2'),
- 'output_dir': settings.getValue(
- 'TRAFFICGEN_IXNET_TESTER_RESULT_DIR'),
+ 'output_dir':
+ settings.getValue('TRAFFICGEN_IXNET_TESTER_RESULT_DIR'),
}
self._logger.debug('IXIA configuration configuration : %s', self._cfg)
@@ -365,7 +365,7 @@ class IxNet(trafficgen.ITrafficGenerator):
results[ResultsConstants.THROUGHPUT_TX_MBPS] = tx_mbps
results[ResultsConstants.THROUGHPUT_RX_MBPS] = row[10]
results[ResultsConstants.THROUGHPUT_TX_PERCENT] = row[7]
- results[ResultsConstants.THROUGHPUT_TX_PERCENT] = row[8]
+ results[ResultsConstants.THROUGHPUT_RX_PERCENT] = row[8]
results[ResultsConstants.MIN_LATENCY_NS] = row[15]
results[ResultsConstants.MAX_LATENCY_NS] = row[16]
results[ResultsConstants.AVG_LATENCY_NS] = row[17]
@@ -468,7 +468,8 @@ class IxNet(trafficgen.ITrafficGenerator):
:returns: Best parsed result from CSV file.
"""
- results = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
+ results = OrderedDict()
+ results[ResultsConstants.B2B_FRAMES] = 0
with open(path, 'r') as in_file:
reader = csv.reader(in_file, delimiter=',')
@@ -477,29 +478,20 @@ class IxNet(trafficgen.ITrafficGenerator):
# if back2back count higher than previously found, store it
# Note: row[N] here refers to the Nth column of a row
if float(row[14]) <= self._params['config']['lossrate']:
- if int(row[12]) > int(results[5]):
- results = [
- float(row[9]), # rx throughput (fps)
- float(row[10]), # rx throughput (mbps)
- float(row[7]), # tx rate (% linerate)
- float(row[8]), # rx rate (% linerate)
- int(row[11]), # tx count (frames)
- int(row[12]), # back2back count (frames)
- int(row[13]), # frame loss (frames)
- float(row[14]), # frame loss (%)
- ]
+ if int(row[12]) > \
+ int(results[ResultsConstants.B2B_FRAMES]):
+ results[ResultsConstants.B2B_FRAMES] = int(row[12])
return results
- self.run_tcl('waitForRfc2544Test')
+ output = self.run_tcl('waitForRfc2544Test')
# the run_tcl function will return a list with one element. We extract
# that one element (a string representation of an IXIA-specific Tcl
# datatype), parse it to find the path of the results file then parse
# the results file
- #TODO implement back2back result via IResult interface.
- #return parse_ixnet_rfc_results(parse_result_string(output[0]))
+ return parse_ixnet_rfc_results(parse_result_string(output[0]))
if __name__ == '__main__':