mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 10:25:17 +00:00
make limit logic in STATUS
This commit is contained in:
parent
b1ddf06f37
commit
67562b3e46
@ -61,6 +61,8 @@ class StepperStatus(object):
|
||||
'duration': None,
|
||||
'ammo_count': None,
|
||||
}
|
||||
self.loop_limit = None
|
||||
self.ammo_limit = None
|
||||
|
||||
def publish(self, key, value):
|
||||
if key not in self.info:
|
||||
@ -78,6 +80,8 @@ class StepperStatus(object):
|
||||
def ammo_count(self, value):
|
||||
#self._ammo_count = value
|
||||
self.info['ammo_count'] = value
|
||||
if self.ammo_limit and value > self.ammo_limit:
|
||||
raise StopIteration
|
||||
|
||||
@property
|
||||
def loop_count(self):
|
||||
@ -88,6 +92,8 @@ class StepperStatus(object):
|
||||
def loop_count(self, value):
|
||||
#self._loop_count = value
|
||||
self.info['loop_count'] = value
|
||||
if self.loop_limit and value > self.loop_limit:
|
||||
raise StopIteration
|
||||
|
||||
def get_info(self):
|
||||
for key in self.info:
|
||||
|
Loading…
Reference in New Issue
Block a user