mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-07 02:45:21 +00:00
set pandora target from load.ini
This commit is contained in:
parent
3f106404b2
commit
4d227109c3
@ -70,6 +70,9 @@ class PoolConfig(object):
|
||||
def set_user_schedule(self, user_schedule):
|
||||
self.config["UserLimiter"] = user_schedule
|
||||
|
||||
def set_target(self, target):
|
||||
self.config["Gun"]["Parameters"]["Target"] = target
|
||||
|
||||
def data(self):
|
||||
return self.config
|
||||
|
||||
@ -78,6 +81,7 @@ def main():
|
||||
pool_config = PoolConfig()
|
||||
pool_config.set_loop(1)
|
||||
pool_config.set_startup_schedule(parse_schedule("periodic(100, 100, 100)"))
|
||||
pool_config.set_target("example.org:443")
|
||||
pandora_config = PandoraConfig()
|
||||
pandora_config.add_pool(pool_config)
|
||||
print(pandora_config.json())
|
||||
|
@ -73,6 +73,9 @@ class PandoraPlugin(AbstractPlugin, AggregateResultListener):
|
||||
raise RuntimeError(
|
||||
"user_schedule not specified")
|
||||
|
||||
target = self.get_option("target", "localhost:3000")
|
||||
pool_config.set_target(target)
|
||||
|
||||
self.pandora_config = PandoraConfig()
|
||||
self.pandora_config.add_pool(pool_config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user