From 4750bf6d9a8e7e3991efd9c1224bdde9ecdb8980 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Mon, 19 Sep 2016 14:36:26 +0200 Subject: [PATCH] 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 --- src/mpExperienceIperf.py | 4 ++-- src/mpParamXp.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mpExperienceIperf.py b/src/mpExperienceIperf.py index 890a7ce..0654c3d 100644 --- a/src/mpExperienceIperf.py +++ b/src/mpExperienceIperf.py @@ -34,7 +34,7 @@ class MpExperienceIperf(MpExperience): """ todo : param LD_PRELOAD ?? """ - pass + self.time = self.xpParam.getParam(MpParamXp.IPERFTIME) def prepare(self): MpExperience.prepare(self) @@ -45,7 +45,7 @@ class MpExperienceIperf(MpExperience): def getClientCmd(self): s = MpExperienceIperf.IPERF_BIN + " -c " + self.mpConfig.getServerIP() + \ - " -t 10 &>" + MpExperienceIperf.IPERF_LOG + " -t " + self.time + " &>" + MpExperienceIperf.IPERF_LOG print(s) return s diff --git a/src/mpParamXp.py b/src/mpParamXp.py index 3b57039..ec4f5c9 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -56,6 +56,7 @@ class MpParamXp(MpParam): DITGCONSTANTPACKETSSEC = "ditgConstantPacketsSec" DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec" DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec" + IPERFTIME = "iperfTime" PRIOPATH0 = "prioPath0" PRIOPATH1 = "prioPath1" BACKUPPATH0 = "backupPath0" @@ -141,6 +142,7 @@ class MpParamXp(MpParam): defaultValue[DITGCONSTANTPACKETSSEC] = "0" defaultValue[DITGBURSTSONPACKETSSEC] = "0" defaultValue[DITGBURSTSOFFPACKETSSEC] = "0" + defaultValue[IPERFTIME] = "10" defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH1] = "0" defaultValue[BACKUPPATH0] = "0"