aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/pkt_gen/testcenter/testcenter.py36
1 files changed, 28 insertions, 8 deletions
diff --git a/tools/pkt_gen/testcenter/testcenter.py b/tools/pkt_gen/testcenter/testcenter.py
index b1351155..2adf6c90 100644
--- a/tools/pkt_gen/testcenter/testcenter.py
+++ b/tools/pkt_gen/testcenter/testcenter.py
@@ -149,10 +149,20 @@ class TestCenter(trafficgen.ITrafficGenerator):
csvreader = csv.DictReader(csvfile)
for row in csvreader:
self._logger.info("Row: %s", row)
- result[ResultsConstants.TX_RATE_FPS] = 0.0
- result[ResultsConstants.THROUGHPUT_RX_FPS] = 0.0
- result[ResultsConstants.TX_RATE_MBPS] = 0.0
- result[ResultsConstants.THROUGHPUT_RX_MBPS] = 0.0
+ tx_fps = ((float(row["TxFrameCount"])) /
+ (float(row["Duration(sec)"])))
+ rx_fps = ((float(row["RxFrameCount"])) /
+ (float(row["Duration(sec)"])))
+ tx_mbps = ((float(row["TxFrameCount"]) *
+ float(row["ConfiguredFrameSize"])) /
+ (float(row["Duration(sec)"]) * 1000000.0))
+ rx_mbps = ((float(row["RxFrameCount"]) *
+ float(row["ConfiguredFrameSize"])) /
+ (float(row["Duration(sec)"]) * 1000000.0))
+ result[ResultsConstants.TX_RATE_FPS] = tx_fps
+ result[ResultsConstants.THROUGHPUT_RX_FPS] = rx_fps
+ result[ResultsConstants.TX_RATE_MBPS] = tx_mbps
+ result[ResultsConstants.THROUGHPUT_RX_MBPS] = rx_mbps
result[ResultsConstants.TX_RATE_PERCENT] = float(
row["OfferedLoad(%)"])
result[ResultsConstants.THROUGHPUT_RX_PERCENT] = float(
@@ -260,10 +270,20 @@ class TestCenter(trafficgen.ITrafficGenerator):
csvreader = csv.DictReader(csvfile)
for row in csvreader:
self._logger.info("Row: %s", row)
- result[ResultsConstants.TX_RATE_FPS] = 0.0
- result[ResultsConstants.THROUGHPUT_RX_FPS] = 0.0
- result[ResultsConstants.TX_RATE_MBPS] = 0.0
- result[ResultsConstants.THROUGHPUT_RX_MBPS] = 0.0
+ tx_fps = ((float(row["TxFrameCount"])) /
+ (float(row["Duration(sec)"])))
+ rx_fps = ((float(row["RxFrameCount"])) /
+ (float(row["Duration(sec)"])))
+ tx_mbps = ((float(row["TxFrameCount"]) *
+ float(row["ConfiguredFrameSize"])) /
+ (float(row["Duration(sec)"]) * 1000000.0))
+ rx_mbps = ((float(row["RxFrameCount"]) *
+ float(row["ConfiguredFrameSize"])) /
+ (float(row["Duration(sec)"]) * 1000000.0))
+ result[ResultsConstants.TX_RATE_FPS] = tx_fps
+ result[ResultsConstants.THROUGHPUT_RX_FPS] = rx_fps
+ result[ResultsConstants.TX_RATE_MBPS] = tx_mbps
+ result[ResultsConstants.THROUGHPUT_RX_MBPS] = rx_mbps
result[ResultsConstants.TX_RATE_PERCENT] = float(
row["OfferedLoad(%)"])
result[ResultsConstants.THROUGHPUT_RX_PERCENT] = float(