Revision 93ddd926
mininet/net.py | ||
---|---|---|
617 | 617 |
|
618 | 618 |
# XXX This should be cleaned up |
619 | 619 |
|
620 |
def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format=None ):
|
|
620 |
def iperf( self, hosts=None, l4Type='TCP', udpBw='10M', format='M' ):
|
|
621 | 621 |
"""Run iperf between two hosts. |
622 | 622 |
hosts: list of hosts; if None, uses opposite hosts |
623 | 623 |
l4Type: string, one of [ TCP, UDP ] |
... | ... | |
640 | 640 |
bwArgs = '-b ' + udpBw + ' ' |
641 | 641 |
elif l4Type != 'TCP': |
642 | 642 |
raise Exception( 'Unexpected l4 type: %s' % l4Type ) |
643 |
if format:
|
|
644 |
iperfArgs += '-f %s ' % format
|
|
643 |
if not format == 'M':
|
|
644 |
iperfArgs += '-f %s ' %format
|
|
645 | 645 |
server.sendCmd( iperfArgs + '-s', printPid=True ) |
646 | 646 |
servout = '' |
647 | 647 |
while server.lastPid is None: |
mininet/test/test_hifi.py | ||
---|---|---|
106 | 106 |
# pylint: enable-msg=W0612 |
107 | 107 |
for rttval in [rttmin, rttavg, rttmax]: |
108 | 108 |
# Multiply delay by 4 to cover there & back on two links |
109 |
self.assertWithinTolerance( rttval, DELAY_MS * 4.0, |
|
109 |
self.assertWithinTolerance( rttval, DELAY_MS * 4.0,
|
|
110 | 110 |
DELAY_TOLERANCE) |
111 | 111 |
|
112 | 112 |
|
Also available in: Unified diff