mpExperienceIperf: add iperfParallel parameter

Allow to specify the number of parallel connections to make for an iperf
test. Useful to model congestion in a network.
This commit is contained in:
Quentin De Coninck 2016-09-20 15:57:14 +02:00
parent 4750bf6d9a
commit 8476882cf2
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class MpExperienceIperf(MpExperience):
todo : param LD_PRELOAD ?? todo : param LD_PRELOAD ??
""" """
self.time = self.xpParam.getParam(MpParamXp.IPERFTIME) self.time = self.xpParam.getParam(MpParamXp.IPERFTIME)
self.parallel = self.xpParam.getParam(MpParamXp.IPERFPARALLEL)
def prepare(self): def prepare(self):
MpExperience.prepare(self) MpExperience.prepare(self)
@ -45,7 +46,7 @@ class MpExperienceIperf(MpExperience):
def getClientCmd(self): def getClientCmd(self):
s = MpExperienceIperf.IPERF_BIN + " -c " + self.mpConfig.getServerIP() + \ s = MpExperienceIperf.IPERF_BIN + " -c " + self.mpConfig.getServerIP() + \
" -t " + self.time + " &>" + MpExperienceIperf.IPERF_LOG " -t " + self.time + " -P " + self.parallel + " &>" + MpExperienceIperf.IPERF_LOG
print(s) print(s)
return s return s

View File

@ -57,6 +57,7 @@ class MpParamXp(MpParam):
DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec" DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec"
DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec" DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec"
IPERFTIME = "iperfTime" IPERFTIME = "iperfTime"
IPERFPARALLEL = "iperfParallel"
PRIOPATH0 = "prioPath0" PRIOPATH0 = "prioPath0"
PRIOPATH1 = "prioPath1" PRIOPATH1 = "prioPath1"
BACKUPPATH0 = "backupPath0" BACKUPPATH0 = "backupPath0"
@ -143,6 +144,7 @@ class MpParamXp(MpParam):
defaultValue[DITGBURSTSONPACKETSSEC] = "0" defaultValue[DITGBURSTSONPACKETSSEC] = "0"
defaultValue[DITGBURSTSOFFPACKETSSEC] = "0" defaultValue[DITGBURSTSOFFPACKETSSEC] = "0"
defaultValue[IPERFTIME] = "10" defaultValue[IPERFTIME] = "10"
defaultValue[IPERFPARALLEL] = "1"
defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH0] = "0"
defaultValue[PRIOPATH1] = "0" defaultValue[PRIOPATH1] = "0"
defaultValue[BACKUPPATH0] = "0" defaultValue[BACKUPPATH0] = "0"