summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-05-15 11:51:56 +0200
committerLuc Provoost <luc.provoost@intel.com>2020-05-15 11:55:09 +0200
commit8f21fb5ed8231125bca3cec1329d9fd739f14684 (patch)
tree2644761fd8e751060dfa41021eb4ce577b16f9a3 /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
parent9d4e94ed8cbd2110cab0388181bad3223a1155ce (diff)
Support for imix packet sizes
All packet size in the *.test files have been replaces with imix sizes. imix is now a list of packet sizes. If you want to run with only a pakcet size of 64, you need to specify a list containing only 1 size: [64]. You can also specify multiple imix values by specifying a list of list of sizes. The keyworkds in the test files are now imix & imixs. Change-Id: Iea47c0266b022133b7bbfc9a6811e3199ae41521 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
index d70fd50e..f5155a57 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
@@ -20,6 +20,7 @@
import sys
import time
from math import ceil
+from statistics import mean
from past.utils import old_div
from rapid_log import RapidLog
from rapid_log import bcolors
@@ -107,13 +108,14 @@ class FlowSizeTest(RapidTest):
# writer.writeheader()
self.gen_machine.start_latency_cores()
TestPassed = True
- for size in self.test['packetsizes']:
- self.gen_machine.set_udp_packet_size(size)
+ for imix in self.test['imixs']:
+ size = mean(imix)
+ self.gen_machine.set_udp_packet_size(imix)
if self.background_machines:
backgroundinfo = '{}Running {} x background traffic not represented in the table{}'.format(bcolors.FLASH,len(self.background_machines),bcolors.ENDC)
else:
backgroundinfo = '{}{}'.format(bcolors.FLASH,bcolors.ENDC)
- self.set_background_size(self.background_machines, size)
+ self.set_background_size(self.background_machines, imix)
RapidLog.info("+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+")
RapidLog.info('| UDP, {:>5} bytes, different number of flows by randomizing SRC & DST UDP port. {:116.116}|'.format(size, backgroundinfo))
RapidLog.info("+--------+------------------+-------------+-------------+-------------+------------------------+----------+----------+----------+-----------+-----------+-----------+-----------+-------+----+")