From c2971871dd1380b88d58f29211a3e8478aca477a Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 12 Oct 2015 07:15:54 +0100 Subject: Add Pylint to VSPERF commit gate Initial pylint config file has been created to follow current code structure and design. A few issues have been fixed, so currently 56 of 67 files have rating 10/10. There are still issues to be fixed, mainly TODOs/FIXMEs and missing impelentation of abstract class members. Change-Id: Icf5b12c2150258f8ac657f8d50b47a697d1660a0 JIRA: VSPERF-91 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Fatih Degirmenci Reviewed-by: Gene Snider Reviewed-by: Al Morton Reviewed-by: Tv Rao Reviewed-by: Brian Castelli --- tools/load_gen/stress/stress.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/load_gen/stress') diff --git a/tools/load_gen/stress/stress.py b/tools/load_gen/stress/stress.py index 4a53f2d2..4c69a170 100644 --- a/tools/load_gen/stress/stress.py +++ b/tools/load_gen/stress/stress.py @@ -18,6 +18,7 @@ import logging import subprocess import copy +import time from tools import tasks from tools import systeminfo from tools.load_gen.load_gen import ILoadGenerator @@ -111,13 +112,13 @@ class Stress(ILoadGenerator): if self._running: super(Stress, self).start() - def kill(self): + def kill(self, signal='-15', sleep=2): """ Kill stress load if it is active """ if self._running and self._child and self._child.isalive(): - tasks.run_task(['sudo', 'pkill', self._proc_name], - self._logger) + tasks.run_task(['sudo', 'pkill', signal, self._proc_name], self._logger) + time.sleep(sleep) self._logger.info( 'Log available at %s', self._logfile) -- cgit 1.2.3-korg