def setUp(self): super(MonascaScenarioTestCase, self).setUp() self.scenario = utils.MonascaScenario(self.context) self.kwargs = { "dimensions": { "region": "fake_region", "hostname": "fake_host_name", "service": "fake_service", "url": "fake_url" } }
def setup(self): new_metric = {} if "dimensions" in self.config: new_metric = {"dimensions": self.config["dimensions"]} for user, tenant_id in rutils.iterate_per_tenants( self.context["users"]): scenario = monasca_utils.MonascaScenario( context={ "user": user, "task": self.context["task"] }) for i in moves.xrange(self.config["metrics_per_tenant"]): scenario._create_metrics(**new_metric) rutils.interruptable_sleep(0.001) rutils.interruptable_sleep( monasca_utils.CONF.benchmark.monasca_metric_create_prepoll_delay, atomic_delay=1)