mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 10:25:17 +00:00
support pandora gun types
This commit is contained in:
parent
62bcdac31e
commit
0d84d9839a
@ -73,6 +73,9 @@ class PoolConfig(object):
|
||||
def set_target(self, target):
|
||||
self.config["Gun"]["Parameters"]["Target"] = target
|
||||
|
||||
def set_gun_type(self, gun_type):
|
||||
self.config["Gun"]["Type"] = gun_type
|
||||
|
||||
def data(self):
|
||||
return self.config
|
||||
|
||||
|
@ -36,7 +36,7 @@ class PandoraPlugin(AbstractPlugin, AggregateResultListener):
|
||||
def get_available_options(self):
|
||||
opts = ["pandora_cmd", "buffered_seconds",
|
||||
"ammo", "loop", "sample_log", "config_file",
|
||||
"startup_schedule", "user_schedule",]
|
||||
"startup_schedule", "user_schedule", "gun_type"]
|
||||
return opts
|
||||
|
||||
def configure(self):
|
||||
@ -76,6 +76,10 @@ class PandoraPlugin(AbstractPlugin, AggregateResultListener):
|
||||
target = self.get_option("target", "localhost:3000")
|
||||
pool_config.set_target(target)
|
||||
|
||||
gun_type = self.get_option("gun_type", "spdy")
|
||||
self.log.info("Pandora gun type is: %s", gun_type)
|
||||
pool_config.set_gun_type(gun_type)
|
||||
|
||||
self.pandora_config = PandoraConfig()
|
||||
self.pandora_config.add_pool(pool_config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user