From 8476882cf2e71b09d0124965f8ca933ef6a021f6 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Tue, 20 Sep 2016 15:57:14 +0200 Subject: [PATCH] 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. --- src/mpExperienceIperf.py | 3 ++- src/mpParamXp.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mpExperienceIperf.py b/src/mpExperienceIperf.py index 0654c3d..9547db4 100644 --- a/src/mpExperienceIperf.py +++ b/src/mpExperienceIperf.py @@ -35,6 +35,7 @@ class MpExperienceIperf(MpExperience): todo : param LD_PRELOAD ?? """ self.time = self.xpParam.getParam(MpParamXp.IPERFTIME) + self.parallel = self.xpParam.getParam(MpParamXp.IPERFPARALLEL) def prepare(self): MpExperience.prepare(self) @@ -45,7 +46,7 @@ class MpExperienceIperf(MpExperience): def getClientCmd(self): 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) return s diff --git a/src/mpParamXp.py b/src/mpParamXp.py index ec4f5c9..8ca16e6 100644 --- a/src/mpParamXp.py +++ b/src/mpParamXp.py @@ -57,6 +57,7 @@ class MpParamXp(MpParam): DITGBURSTSONPACKETSSEC = "ditgBurstsOnPacketsSec" DITGBURSTSOFFPACKETSSEC = "ditgBurstsOffPacketsSec" IPERFTIME = "iperfTime" + IPERFPARALLEL = "iperfParallel" PRIOPATH0 = "prioPath0" PRIOPATH1 = "prioPath1" BACKUPPATH0 = "backupPath0" @@ -143,6 +144,7 @@ class MpParamXp(MpParam): defaultValue[DITGBURSTSONPACKETSSEC] = "0" defaultValue[DITGBURSTSOFFPACKETSSEC] = "0" defaultValue[IPERFTIME] = "10" + defaultValue[IPERFPARALLEL] = "1" defaultValue[PRIOPATH0] = "0" defaultValue[PRIOPATH1] = "0" defaultValue[BACKUPPATH0] = "0"