aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
diff options
context:
space:
mode:
authorJingLu5 <lvjing5@huawei.com>2017-05-25 08:48:15 +0000
committerJing Lu <lvjing5@huawei.com>2017-06-01 12:36:38 +0000
commit9a372b8adf618981e4fbfb8d0cb3a48674c65d92 (patch)
tree1f1bfe82e1854d576e109727afc88c9ab57ffd1c /yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
parentad3ff4cbaf92808801c9157d25416da6cff82666 (diff)
Imporve monitor_process pass criteria
JIRA: YARDSTICK-660 The monitor func()'s criteria in the monitor_process.py now is whether at least one process of the specific controller node service is recovered. But in reality is more resonable to use whether processes have been recoverd to it's original amount. This patch is aiming at improving the isssue Change-Id: I950ce2a89555801b96092735b0d670e892049927 Signed-off-by: JingLu5 <lvjing5@huawei.com> (cherry picked from commit 37921fcd232cd2fbba9f45ef9fa5d8c912f54af6)
Diffstat (limited to 'yardstick/benchmark/scenarios/availability/attacker/baseattacker.py')
-rw-r--r--yardstick/benchmark/scenarios/availability/attacker/baseattacker.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
index ca2324055..7b3d8b0be 100644
--- a/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
+++ b/yardstick/benchmark/scenarios/availability/attacker/baseattacker.py
@@ -25,6 +25,7 @@ class AttackerMgr(object):
def __init__(self):
self._attacker_list = []
+ self.data = {}
def init_attackers(self, attacker_cfgs, context):
LOG.debug("attackerMgr confg: %s", attacker_cfgs)
@@ -35,6 +36,8 @@ class AttackerMgr(object):
attacker_ins.key = cfg['key']
attacker_ins.setup()
self._attacker_list.append(attacker_ins)
+ self.data = dict(self.data.items() + attacker_ins.data.items())
+ return self.data
def __getitem__(self, item):
for obj in self._attacker_list:
@@ -57,6 +60,7 @@ class BaseAttacker(object):
self._config = config
self._context = context
+ self.data = {}
self.setup_done = False
@staticmethod