Add bandwidth support for iperf command
Change-Id: I341bb69d0c27dccb07642346b5dde91bf07ba34d
This commit is contained in:
parent
2a94c16348
commit
affe2202b3
@ -29,6 +29,8 @@ class IperfExecutor(base.BaseExecutor):
|
||||
cmd.add('--len', self.test_definition.get('buffer_size') or '8k')
|
||||
if self.test_definition.get('udp'):
|
||||
cmd.add('--udp')
|
||||
if self.test_definition.get('bandwidth'):
|
||||
cmd.add('--bandwidth', self.test_definition.get('bandwidth'))
|
||||
cmd.add('--time', self.test_definition.get('time') or 60)
|
||||
cmd.add('--parallel', self.test_definition.get('threads') or 1)
|
||||
if self.test_definition.get('csv'):
|
||||
|
@ -35,10 +35,11 @@ class TestIperfGraphExecutor(testtools.TestCase):
|
||||
|
||||
def test_get_command_udp(self):
|
||||
executor = iperf.IperfGraphExecutor(
|
||||
{'udp': True, 'time': 30}, AGENT)
|
||||
{'udp': True, 'bandwidth': '100M', 'time': 30}, AGENT)
|
||||
|
||||
expected = {'data': ('sudo nice -n -20 iperf --client %s --format m '
|
||||
'--nodelay --len 8k --udp --time 30 --parallel 1 '
|
||||
'--nodelay --len 8k --udp --bandwidth 100M '
|
||||
'--time 30 --parallel 1 '
|
||||
'--reportstyle C --interval 1') % IP,
|
||||
'type': 'program'}
|
||||
self.assertEqual(expected, executor.get_command())
|
||||
|
Loading…
x
Reference in New Issue
Block a user