Exemple #1
0
 def load(self):
     load_settings = self.test_config.load_settings
     log_phase('load phase', load_settings)
     src_target_iterator = SrcTargetIterator(self.cluster_spec,
                                             self.test_config)
     self.worker_manager.run_workload(load_settings, src_target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #2
0
    def hot_load(self):
        hot_load_settings = self.test_config.hot_load_settings

        log_phase('hot load phase', hot_load_settings)
        self.worker_manager.run_workload(hot_load_settings,
                                         self.target_iterator)
        self.worker_manager.wait_for_workers()
Exemple #3
0
 def load(self):
     load_settings = self.test_config.load_settings
     log_phase('load phase', load_settings)
     src_target_iterator = SrcTargetIterator(self.cluster_spec,
                                             self.test_config)
     self.worker_manager.run_workload(load_settings, src_target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #4
0
    def access(self, access_settings=None):
        if access_settings is None:
            access_settings = self.test_config.access_settings

        log_phase('access phase', access_settings)
        self.worker_manager.run_workload(access_settings, self.target_iterator)
        self.worker_manager.wait_for_workers()
Exemple #5
0
 def access_bg(self):
     access_settings = self.test_config.access_settings
     log_phase('access phase in background', access_settings)
     access_settings.index_type = self.test_config.index_settings.index_type
     access_settings.n1ql = getattr(self, 'n1ql', None)
     access_settings.ddocs = getattr(self, 'ddocs', None)
     self.worker_manager.run_workload(access_settings, self.target_iterator,
                                      timer=access_settings.time)
Exemple #6
0
 def access_bg_with_ddocs(self):
     access_settings = self.test_config.access_settings
     log_phase('access phase', access_settings)
     index_type = self.test_config.index_settings.index_type
     self.worker_manager.run_workload(access_settings, self.target_iterator,
                                      timer=access_settings.time,
                                      ddocs=self.ddocs,
                                      index_type=index_type)
Exemple #7
0
 def access_bg_with_ddocs(self):
     access_settings = self.test_config.access_settings
     log_phase('access phase', access_settings)
     index_type = self.test_config.index_settings.index_type
     self.worker_manager.run_workload(access_settings,
                                      self.target_iterator,
                                      timer=access_settings.time,
                                      ddocs=self.ddocs,
                                      index_type=index_type)
Exemple #8
0
    def load(self, load_settings=None, target_iterator=None):
        if load_settings is None:
            load_settings = self.test_config.load_settings
        if target_iterator is None:
            target_iterator = self.target_iterator

        log_phase('load phase', load_settings)
        self.worker_manager.run_workload(load_settings, target_iterator)
        self.worker_manager.wait_for_workers()
    def access(self, access_settings=None):
        if access_settings is None:
            access_settings = self.test_config.access_settings
        if self.test_config.spatial_settings:
            access_settings.spatial = self.test_config.spatial_settings

        log_phase('access phase', access_settings)
        self.worker_manager.run_workload(access_settings, self.target_iterator)
        self.worker_manager.wait_for_workers()
    def hot_load(self):
        hot_load_settings = self.test_config.hot_load_settings
        if self.test_config.spatial_settings:
            hot_load_settings.spatial = self.test_config.spatial_settings

        log_phase('hot load phase', hot_load_settings)
        self.worker_manager.run_workload(hot_load_settings,
                                         self.target_iterator)
        self.worker_manager.wait_for_workers()
 def load(self, load_settings=None, target_iterator=None):
     if load_settings is None:
         load_settings = self.test_config.load_settings
     if target_iterator is None:
         target_iterator = self.target_iterator
     if self.test_config.spatial_settings:
         load_settings.spatial = self.test_config.spatial_settings
     log_phase('load phase', load_settings)
     self.worker_manager.run_workload(load_settings, target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #12
0
    def access_bg(self, access_settings=None, target_iterator=None):
        if access_settings is None:
            access_settings = self.test_config.access_settings
        if target_iterator is None:
            target_iterator = self.target_iterator

        log_phase('access phase in background', access_settings)
        access_settings.index_type = self.test_config.index_settings.index_type
        access_settings.ddocs = getattr(self, 'ddocs', None)
        self.worker_manager.run_workload(access_settings,
                                         target_iterator,
                                         timer=access_settings.time)
Exemple #13
0
 def run_workload(self, settings, target_iterator, timer=None,
                  run_workload=task_run_workload):
     self.workers = []
     for target in target_iterator:
         log_phase('workload generator', settings)
         qname = '{}-{}'.format(target.node.split(':')[0], target.bucket)
         queue = Queue(name=qname)
         worker = run_workload.apply_async(
             args=(settings, target, timer),
             queue=queue.name, expires=timer,
         )
         self.workers.append(worker)
         sleep(self.RACE_DELAY)
Exemple #14
0
 def access(self):
     settings = self.test_config.access_settings
     if self.test_config.test_case.use_workers:
         log_phase('access phase', settings)
         self.worker_manager.run_workload(settings,
                                          self.target_iterator,
                                          run_workload=run_pillowfight_via_celery)
         self.worker_manager.wait_for_workers()
     else:
         for target in self.target_iterator:
             host, port = target.node.split(':')
             Pillowfight(host=host, port=port, bucket=target.bucket,
                         password=self.test_config.bucket.password,
                         num_items=settings.items,
                         num_threads=settings.workers,
                         writes=settings.updates,
                         size=settings.size).run()
Exemple #15
0
    def run_workload(self,
                     settings,
                     target_iterator,
                     timer=None,
                     run_workload=task_run_workload):
        self.workers = []
        for target in target_iterator:
            log_phase('workload generator', settings)

            qname = '{}-{}'.format(target.node.split(':')[0], target.bucket)
            queue = Queue(name=qname)
            worker = run_workload.apply_async(
                args=(settings, target, timer),
                queue=queue.name,
                expires=timer,
            )
            self.workers.append(worker)
            sleep(self.RACE_DELAY)
Exemple #16
0
 def access(self):
     settings = self.test_config.access_settings
     if self.test_config.test_case.use_workers:
         log_phase('access phase', settings)
         self.worker_manager.run_workload(
             settings,
             self.target_iterator,
             run_workload=run_pillowfight_via_celery)
         self.worker_manager.wait_for_workers()
     else:
         for target in self.target_iterator:
             host, port = target.node.split(':')
             Pillowfight(host=host,
                         port=port,
                         bucket=target.bucket,
                         password=self.test_config.bucket.password,
                         num_items=settings.items,
                         num_threads=settings.workers,
                         writes=settings.updates,
                         size=settings.size).run()
Exemple #17
0
    def run(self):
        self.start_test_info()

        self.generate_gateload_configs()
        self.remote.start_gateload()
        for idx, gateload in enumerate(self.remote.gateloads, start=1):
            self.request_helper.wait_for_gateload_to_start(idx, gateload)

        self.remote.restart_seriesly()
        self.request_helper.wait_for_seriesly_to_start(
            self.test_config.gateload_settings.seriesly_host)
        self.start_samplers()

        log_phase('Gateload settings', self.test_config.gateload_settings)
        log_phase('Gateway settings', self.test_config.gateway_settings)

        self.workload()

        self.remote.collect_profile_data_gateways()

        return self.collect_kpi()
    def run(self):
        self.start_test_info()

        self.generate_gateload_configs()
        self.remote.start_gateload()
        for idx, gateload in enumerate(self.remote.gateloads, start=1):
            self.request_helper.wait_for_gateload_to_start(idx, gateload)

        self.remote.restart_seriesly()
        self.request_helper.wait_for_seriesly_to_start(self.test_config.gateload_settings.seriesly_host)
        self.start_samplers()

        log_phase('Gateload settings', self.test_config.gateload_settings)
        log_phase('Gateway settings', self.test_config.gateway_settings)
        log_phase('Stats settings', self.test_config.stats_settings)

        self.workload()

        self.remote.collect_profile_data_gateways()
        self.remote.collect_info_gateway()
        self.remote.collect_info_gateload()
        self.reporter.check_sgw_logs()
        self.reporter.save_expvar()

        return self.collect_kpi()
Exemple #19
0
 def access_bg(self):
     access_settings = self.test_config.access_settings
     log_phase('access in background', access_settings)
     self.worker_manager.run_workload(access_settings, self.target_iterator,
                                      timer=access_settings.time)
Exemple #20
0
 def load(self):
     load_settings = self.test_config.load_settings
     log_phase('load phase', load_settings)
     self.worker_manager.run_workload(load_settings, self.target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #21
0
 def access(self):
     access_settings = self.test_config.access_settings
     log_phase('access phase', access_settings)
     self.worker_manager.run_workload(access_settings, self.target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #22
0
 def load(self):
     load_settings = self.test_config.load_settings
     log_phase('load phase', load_settings)
     self.worker_manager.run_workload(load_settings, self.target_iterator)
     self.worker_manager.wait_for_workers()
Exemple #23
0
 def access_bg(self):
     access_settings = self.test_config.access_settings
     log_phase('access in background', access_settings)
     self.worker_manager.run_workload(access_settings,
                                      self.target_iterator,
                                      timer=access_settings.time)