diff options
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py')
-rw-r--r-- | testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py b/testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py index afdf44d7..25272d89 100644 --- a/testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py +++ b/testsuites/vstf/vstf_scripts/vstf/agent/perf/qperf.py @@ -18,6 +18,7 @@ LOG = logging.getLogger(__name__) class Qperf(object): + def __init__(self): self._send_processes = [] self._receive_processes = [] @@ -30,7 +31,10 @@ class Qperf(object): def send_start(self, **kwargs): cmd = self.format_send_start(**kwargs) LOG.info("cmd:%s", cmd) - process = my_popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process = my_popen( + cmd.split(), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) time.sleep(0.5) ret = process.poll() if ret is None: @@ -76,7 +80,10 @@ class Qperf(object): cmd = self.format_receive_start(**kwargs) LOG.info("cmd:%s", cmd) - process = my_popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process = my_popen( + cmd.split(), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) time.sleep(0.5) ret = process.poll() if ret is None: @@ -163,5 +170,8 @@ def unit_test(): if __name__ == "__main__": from vstf.common.log import setup_logging - setup_logging(level=logging.DEBUG, log_file="/var/log/vstf/vstf-qperf.log", clevel=logging.DEBUG) + setup_logging( + level=logging.DEBUG, + log_file="/var/log/vstf/vstf-qperf.log", + clevel=logging.DEBUG) unit_test() |