def test(self): for sink in self.sinks: sink.cmd('iperf3 -s -D') info('Collecting data...\n') self.waiting_time = self.config.duration + 2 for i in range(self.N): send_cmd = SND_CMD % ('10.0.2.%d' % (i+1), self.config.duration, self.config.tcp, self.config.mss, i) self.sources[i].cmd('sleep %d && %s &' % (i * self.config.gap + 1, send_cmd)) Case.test(self)
def test(self): for i in range(self.F): self.host[i]['dst'].cmd('iperf3 -s -D') info('Collecting data...\n') self.waiting_time = self.config.duration + 2 for i in range(self.F): send_cmd = SND_CMD % ('10.0.2.%d' % (i+1), self.config.duration, self.config.tcp, self.config.mss, i) self.host[i]['src'].cmd('sleep %d && %s &' % (2, send_cmd)) Case.test(self) self.report()
def test(self): info('Collecting data...\n') self.waiting_time = self.config.duration + self.delay + 2 cnt = 0 for sender, receiver, sip, dip, tcp, delay in self.flows: recv_cmd = 'iperf3 -s -D' send_cmd = SND_CMD % (dip, self.config.duration, tcp, self.config.mss, cnt) cnt += 1 receiver.cmd(recv_cmd) sender.cmd('sleep %d && %s &' % (delay, send_cmd)) Case.test(self) self.report()
def test(self): for tsink in self.sinks: for sink in tsink['hosts']: sink.cmd('iperf3 -s -D') info('Collecting data...\n') self.waiting_time = self.config.duration + 2 cnt = 0 for t in range(len(self.sources)): for i in range(len(self.sources[t]['hosts'])): send_cmd = SND_CMD % ('10.0.%d.%d' % (2*t+2, i+1), self.config.duration, self.sources[t]['tcp'], self.config.mss, cnt) self.sources[t]['hosts'][i].cmd('sleep %d && %s &' % (i * self.config.gap + 1, send_cmd)) cnt += 1 Case.test(self) self.report()
def test(self): info('Collecting data...\n') self.waiting_time = self.config.duration + 2 for i in range(self.N-1): mon_cmd = MON_CMD % ('h%s-eth0' % i, 'h%s' % i, '') self.host[i].cmd('sleep %d && %s &' % (1, mon_cmd)) self.host[i+1].cmd('iperf3 -s -D') send_cmd = SND_CMD % ('10.0.1.%d' % (i+2), self.config.duration, self.config.tcp, self.config.mss, i) self.host[i].cmd('sleep %d && %s &' % (2, send_cmd)) for i in range(1): mon_cmd = MON_CMD % ('extra%s-eth0' % i, 'e%s' % (i), '') self.extra_host[i].cmd('sleep %d && %s &' % (1, mon_cmd)) self.extra_host[i+1].cmd('iperf3 -s -D') send_cmd = SND_CMD % ('10.0.2.%d' % (i+2), self.config.duration, self.config.tcp, self.config.mss, i + self.N -1) self.extra_host[i].cmd('sleep %d && %s &' % (2, send_cmd)) Case.test(self)