mpExperienceIperf: add iperfTime parameter

Now, the iperf test is not stuck to 10 seconds anymore (it's still the
default value anyway).

Signed-off-by: Quentin De Coninck <quentin.deconinck@uclouvain.be>
This commit is contained in:
Quentin De Coninck 2016-09-19 14:36:26 +02:00
parent 2d75e41204
commit 4750bf6d9a
2 changed files with 4 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class MpExperienceIperf(MpExperience):
""" """
todo : param LD_PRELOAD ?? todo : param LD_PRELOAD ??
""" """
pass self.time = self.xpParam.getParam(MpParamXp.IPERFTIME)
def prepare(self): def prepare(self):
MpExperience.prepare(self) MpExperience.prepare(self)
@ -45,7 +45,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 10 &>" + MpExperienceIperf.IPERF_LOG " -t " + self.time + " &>" + MpExperienceIperf.IPERF_LOG
print(s) print(s)
return s return s

View File

@ -56,6 +56,7 @@ class MpParamXp(MpParam):
DITGCONSTANTPACKETSSEC = "ditgConstantPacketsSec" DITGCONSTANTPACKETSSEC = "ditgConstantPacketsSec"
DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec" DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec"
DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec" DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec"
IPERFTIME = "iperfTime"
PRIOPATH0 = "prioPath0" PRIOPATH0 = "prioPath0"
PRIOPATH1 = "prioPath1" PRIOPATH1 = "prioPath1"
BACKUPPATH0 = "backupPath0" BACKUPPATH0 = "backupPath0"
@ -141,6 +142,7 @@ class MpParamXp(MpParam):
defaultValue[DITGCONSTANTPACKETSSEC] = "0" defaultValue[DITGCONSTANTPACKETSSEC] = "0"
defaultValue[DITGBURSTSONPACKETSSEC] = "0" defaultValue[DITGBURSTSONPACKETSSEC] = "0"
defaultValue[DITGBURSTSOFFPACKETSSEC] = "0" defaultValue[DITGBURSTSOFFPACKETSSEC] = "0"
defaultValue[IPERFTIME] = "10"
defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH0] = "0"
defaultValue[PRIOPATH1] = "0" defaultValue[PRIOPATH1] = "0"
defaultValue[BACKUPPATH0] = "0" defaultValue[BACKUPPATH0] = "0"