diff options
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 7 | ||||
-rw-r--r-- | yardstick/benchmark/contexts/model.py | 5 | ||||
-rw-r--r-- | yardstick/benchmark/runners/iteration.py | 8 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/compute/cyclictest.py | 6 |
4 files changed, 21 insertions, 5 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 604df80d1..d5dccd2a2 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -133,8 +133,11 @@ class HeatContext(Context): template.add_security_group(self.secgroup_name) for network in self.networks: - template.add_network(network.stack_name) - template.add_subnet(network.subnet_stack_name, network.stack_name, + template.add_network(network.stack_name, + network.physical_network, + network.provider) + template.add_subnet(network.subnet_stack_name, + network.stack_name, network.subnet_cidr) if network.router: diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py index 4873afde3..71ee1f3c2 100644 --- a/yardstick/benchmark/contexts/model.py +++ b/yardstick/benchmark/contexts/model.py @@ -105,6 +105,8 @@ class Network(Object): self.subnet_stack_name = self.stack_name + "-subnet" self.subnet_cidr = attrs.get('cidr', '10.0.1.0/24') self.router = None + self.physical_network = attrs.get('physical_network', 'physnet1') + self.provider = attrs.get('provider', None) if "external_network" in attrs: self.router = Router("router", self.name, @@ -226,7 +228,8 @@ class Server(Object): # pragma: no cover self.ports[network.name] = {"stack_name": port_name} template.add_port(port_name, network.stack_name, network.subnet_stack_name, - sec_group_id=self.secgroup_name) + sec_group_id=self.secgroup_name, + provider=network.provider) port_name_list.append(port_name) if self.floating_ip: diff --git a/yardstick/benchmark/runners/iteration.py b/yardstick/benchmark/runners/iteration.py index c2376af48..29daa0d42 100644 --- a/yardstick/benchmark/runners/iteration.py +++ b/yardstick/benchmark/runners/iteration.py @@ -41,6 +41,10 @@ def _worker_process(queue, cls, method_name, scenario_cfg, interval = runner_cfg.get("interval", 1) iterations = runner_cfg.get("iterations", 1) run_step = runner_cfg.get("run_step", "setup,run,teardown") + delta = runner_cfg.get("delta", 2) + options_cfg = scenario_cfg['options'] + initial_rate = options_cfg.get("rate", 100) + scenario_cfg['options']['rate'] = initial_rate LOG.info("worker START, iterations %d times, class %s", iterations, cls) runner_cfg['runner_id'] = os.getpid() @@ -77,6 +81,10 @@ def _worker_process(queue, cls, method_name, scenario_cfg, elif sla_action == "monitor": LOG.warning("SLA validation failed: %s", assertion.args) errors = assertion.args + elif sla_action == "rate-control": + scenario_cfg['options']['rate'] -= delta + sequence = 1 + continue except Exception as e: errors = traceback.format_exc() LOG.exception(e) diff --git a/yardstick/benchmark/scenarios/compute/cyclictest.py b/yardstick/benchmark/scenarios/compute/cyclictest.py index 37d8472ef..594c6091e 100644 --- a/yardstick/benchmark/scenarios/compute/cyclictest.py +++ b/yardstick/benchmark/scenarios/compute/cyclictest.py @@ -165,14 +165,15 @@ class Cyclictest(base.Scenario): options = self.scenario_cfg["options"] affinity = options.get("affinity", 1) + breaktrace = options.get("breaktrace", 1000) interval = options.get("interval", 1000) priority = options.get("priority", 99) loops = options.get("loops", 1000) threads = options.get("threads", 1) histogram = options.get("histogram", 90) - cmd_args = "-a %s -i %s -p %s -l %s -t %s -h %s %s" \ - % (affinity, interval, priority, loops, + cmd_args = "-a %s -b %s -i %s -p %s -l %s -t %s -h %s %s" \ + % (affinity, breaktrace, interval, priority, loops, threads, histogram, default_args) cmd = "bash cyclictest_benchmark.sh %s" % (cmd_args) LOG.debug("Executing command: %s", cmd) @@ -214,6 +215,7 @@ def _test(): # pragma: no cover options = { "affinity": 2, + "breaktrace": 1000, "interval": 100, "priority": 88, "loops": 10000, |