Introduce pure netperf executor

This commit is contained in:
Ilya Shakhat 2015-02-13 01:05:53 +03:00
parent 8f4a31a7cd
commit 1f6956b230
3 changed files with 15 additions and 2 deletions

View File

@ -15,7 +15,7 @@ execution:
nodes: [1]
tests:
-
class: netperf
class: netperf_wrapper
method: ping
-
class: shell

View File

@ -16,7 +16,7 @@ execution:
tests:
-
class: netperf
method: tcp_bidirectional
method: TCP_STREAM
-
class: shell
method: ls -al

View File

@ -42,6 +42,18 @@ class ShellExecutor(BaseExecutor):
class NetperfExecutor(BaseExecutor):
def get_command(self):
target_ip = self.agent['group']['slave']['ip']
return ('netperf -H %(ip)s -l 30 -t %(method)s' %
dict(ip=target_ip,
method=self.test_definition['method']))
def process_reply(self, message):
LOG.debug('Test %s on agent %s finished with %s',
self.test_definition, self.agent, message)
class NetperfWrapperExecutor(BaseExecutor):
def get_command(self):
target_ip = self.agent['group']['slave']['ip']
return ('netperf-wrapper -H %(ip)s -f stats %(method)s' %
@ -56,6 +68,7 @@ class NetperfExecutor(BaseExecutor):
EXECUTORS = {
'shell': ShellExecutor,
'netperf': NetperfExecutor,
'netperf_wrapper': NetperfWrapperExecutor,
'_default': ShellExecutor,
}