当前位置: 首页>>代码示例>>Python>>正文


Python remote.RemoteHelper类代码示例

本文整理汇总了Python中perfrunner.helpers.remote.RemoteHelper的典型用法代码示例。如果您正苦于以下问题:Python RemoteHelper类的具体用法?Python RemoteHelper怎么用?Python RemoteHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了RemoteHelper类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

def main():
    args = get_args()

    cluster_spec = ClusterSpec()
    cluster_spec.parse(args.cluster)

    remote = RemoteHelper(cluster_spec, args.verbose)
    remote.get_manifest()
    projects = parse_manifest()
    fetch(projects)
开发者ID:couchbase,项目名称:perfrunner,代码行数:10,代码来源:go_dependencies.py

示例2: main

def main():
    options, args = get_options()

    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname, args)

    remote = RemoteHelper(cluster_spec, test_config=None, verbose=False)

    logger.info('Recovering system state')
    for host, version in remote.get_system_backup_version().items():
        remote.start_system_state_recovery(host, version)
开发者ID:mahesh152,项目名称:perfrunner,代码行数:11,代码来源:recovery.py

示例3: main

def main():
    args = get_args()

    cluster_spec = ClusterSpec()
    cluster_spec.parse(args.cluster_spec_fname)

    remote = RemoteHelper(cluster_spec, verbose=False)

    logger.info('Recovering system state')
    for host, version in remote.get_system_backup_version().items():
        remote.start_system_state_recovery(host, version)
开发者ID:couchbase,项目名称:perfrunner,代码行数:11,代码来源:recovery.py

示例4: main

def main():
    options, args = get_options()

    cluster_spec = ClusterSpec()
    cluster_spec.parse(options.cluster_spec_fname, args)

    remote = RemoteHelper(cluster_spec, test_config=None, verbose=False)

    remote.collect_info()
    for hostname in cluster_spec.yield_hostnames():
        for fname in glob.glob('{}/*.zip'.format(hostname)):
            shutil.move(fname, '{}.zip'.format(hostname))
开发者ID:mahesh152,项目名称:perfrunner,代码行数:12,代码来源:debug.py

示例5: MongoDBInstaller

class MongoDBInstaller(CouchbaseInstaller):

    URL = 'http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz'

    def __init__(self, cluster_spec, options):
        self.remote = RemoteHelper(cluster_spec, None, options.verbose)

    def uninstall_package(self):
        pass

    def clean_data(self):
        self.remote.clean_mongodb()

    def install_package(self):
        self.remote.install_mongodb(url=self.URL)
开发者ID:abhi-bit,项目名称:perfrunner,代码行数:15,代码来源:install_mongo.py

示例6: __init__

    def __init__(self,
                 cluster_spec: ClusterSpec,
                 test_config: TestConfig,
                 verbose: bool):
        self.cluster_spec = cluster_spec
        self.test_config = test_config

        self.target_iterator = TargetIterator(cluster_spec, test_config)

        self.cluster = ClusterManager(cluster_spec, test_config)
        self.memcached = MemcachedHelper(test_config)
        self.monitor = Monitor(cluster_spec, test_config, verbose)
        self.rest = RestHelper(cluster_spec)
        self.remote = RemoteHelper(cluster_spec, verbose)
        self.profiler = Profiler(cluster_spec, test_config)

        self.master_node = next(cluster_spec.masters)
        self.build = self.rest.get_version(self.master_node)

        self.metrics = MetricHelper(self)
        self.reporter = ShowFastReporter(cluster_spec, test_config, self.build)

        self.cbmonitor_snapshots = []
        self.cbmonitor_clusters = []

        if self.test_config.test_case.use_workers:
            self.worker_manager = WorkerManager(cluster_spec, test_config,
                                                verbose)
开发者ID:couchbase,项目名称:perfrunner,代码行数:28,代码来源:__init__.py

示例7: __init__

    def __init__(self, cluster_spec, test_config, experiment=None):
        self.cluster_spec = cluster_spec
        self.test_config = test_config

        self.target_iterator = TargetIterator(self.cluster_spec,
                                              self.test_config)

        self.memcached = MemcachedHelper(cluster_spec)
        self.monitor = Monitor(cluster_spec)
        self.rest = RestHelper(cluster_spec)
        self.remote = RemoteHelper(cluster_spec)

        if experiment:
            self.experiment = ExperimentHelper(experiment,
                                               cluster_spec, test_config)

        self.master_node = cluster_spec.yield_masters().next()
        self.build = self.rest.get_version(self.master_node)

        self.cbagent = CbAgent(self)
        self.metric_helper = MetricHelper(self)
        self.reporter = Reporter(self)
        self.reports = {}
        self.snapshots = []
        self.master_events = []

        if self.test_config.test_case.use_workers:
            self.worker_manager = WorkerManager(cluster_spec, test_config)
开发者ID:lichenyang2,项目名称:perfrunner,代码行数:28,代码来源:__init__.py

示例8: main

def main():
    args = get_args()

    cluster_spec = ClusterSpec()
    cluster_spec.parse(args.cluster_spec_fname)

    remote = RemoteHelper(cluster_spec, verbose=False)

    remote.collect_info()
    for hostname in cluster_spec.servers:
        for fname in glob.glob('{}/*.zip'.format(hostname)):
            shutil.move(fname, '{}.zip'.format(hostname))

    if cluster_spec.backup is not None:
        logs = os.path.join(cluster_spec.backup, 'logs')
        if os.path.exists(logs):
            shutil.make_archive('tools', 'zip', logs)
开发者ID:couchbase,项目名称:perfrunner,代码行数:17,代码来源:debug.py

示例9: __init__

    def __init__(self, test, verbose):
        self.clusters = OrderedDict()
        self.remote = RemoteHelper(test.cluster_spec, test.test_config,
                                   verbose=verbose)

        for cluster_name, servers in test.cluster_spec.yield_clusters():
            cluster = '{}_{}_{}'.format(cluster_name,
                                        test.build.replace('.', ''),
                                        uhex()[:3])
            master = servers[0].split(':')[0]
            self.clusters[cluster] = master
        if test.test_config.test_case.monitor_clients:
            for node in test.cluster_spec.workers:
                cluster = '{}{}'.format(self.clusters.items()[0][0][:-3], uhex()[:3])
                master = node.split(':')[0]
                self.clusters[cluster] = master

        self.index_node = ''
        for _, servers in test.cluster_spec.yield_servers_by_role('index'):
            if servers:
                self.index_node = servers[0].split(':')[0]

        if hasattr(test, 'ALL_BUCKETS'):
            buckets = None
        else:
            buckets = test.test_config.buckets[:1]
        if hasattr(test, 'ALL_HOSTNAMES'):
            hostnames = tuple(test.cluster_spec.yield_hostnames())
        else:
            hostnames = None

        self.settings = type('settings', (object,), {
            'seriesly_host': test.test_config.stats_settings.seriesly['host'],
            'cbmonitor_host_port': test.test_config.stats_settings.cbmonitor['host'],
            'interval': test.test_config.stats_settings.interval,
            'secondary_statsfile': test.test_config.stats_settings.secondary_statsfile,
            'buckets': buckets,
            'hostnames': hostnames,
            'sync_gateway_nodes':
                test.remote.gateways if test.remote else None,
            'monitor_clients':
                test.cluster_spec.workers if test.test_config.test_case.monitor_clients else None,
            'fts_server': test.test_config.test_case.fts_server
        })()
        self.lat_interval = test.test_config.stats_settings.lat_interval
        if test.cluster_spec.ssh_credentials:
            self.settings.ssh_username, self.settings.ssh_password = \
                test.cluster_spec.ssh_credentials
        self.settings.rest_username, self.settings.rest_password = \
            test.cluster_spec.rest_credentials
        self.settings.bucket_password = test.test_config.bucket.password

        self.settings.index_node = self.index_node

        self.collectors = []
        self.processes = []
        self.snapshots = []
        self.fts_stats = None
开发者ID:EricACooper,项目名称:perfrunner,代码行数:58,代码来源:cbmonitor.py

示例10: __init__

    def __init__(self, cluster_spec, test_config, verbose):
        self.cluster_spec = cluster_spec
        self.test_config = test_config
        self.verbose = verbose

        self.snapshot = self.test_config.restore_settings.snapshot

        self.remote = RemoteHelper(self.cluster_spec, self.test_config,
                                   self.verbose)
开发者ID:mahesh152,项目名称:perfrunner,代码行数:9,代码来源:restore.py

示例11: __init__

    def __init__(self, cluster_spec, options):
        self.remote_helper = RemoteHelper(cluster_spec)
        self.cluster_spec = cluster_spec

        arch = self.remote_helper.detect_arch()
        pkg = self.remote_helper.detect_pkg()
        openssl = self.remote_helper.detect_openssl(pkg)

        self.build = Build(arch, pkg, options.version, openssl, options.toy)
        logger.info('Target build info: {}'.format(self.build))
开发者ID:lichenyang2,项目名称:perfrunner,代码行数:10,代码来源:install.py

示例12: calc_network_bandwidth

 def calc_network_bandwidth(self):
     self.remote = RemoteHelper(self.cluster_spec, self.test_config, verbose=True)
     for cluster_name, servers in self.cluster_spec.yield_clusters():
         self.in_bytes_transfer += [self.remote.read_bandwidth_stats("to", servers)]
         self.out_bytes_transfer += [self.remote.read_bandwidth_stats("from", servers)]
     logger.info('in bytes', self.in_bytes_transfer)
     logger.info('out bytes', self.out_bytes_transfer)
     return OrderedDict((
         ('in bytes', sum(self.in_bytes_transfer[0].values())),
         ('out bytes', sum(self.out_bytes_transfer[0].values()))))
开发者ID:EricACooper,项目名称:perfrunner,代码行数:10,代码来源:metrics.py

示例13: __init__

    def __init__(self, test):
        self.clusters = OrderedDict()
        self.remote = RemoteHelper(test.cluster_spec, test.test_config, verbose=True)

        for cluster_name, servers in test.cluster_spec.yield_clusters():
            cluster = "{}_{}_{}".format(cluster_name, test.build.replace(".", ""), uhex()[:3])
            master = servers[0].split(":")[0]
            self.clusters[cluster] = master
        if test.test_config.test_case.monitor_clients:
            for node in test.cluster_spec.workers:
                cluster = "{}{}".format(self.clusters.items()[0][0][:-3], uhex()[:3])
                master = node.split(":")[0]
                self.clusters[cluster] = master

        self.index_node = ""
        for _, servers in test.cluster_spec.yield_servers_by_role("index"):
            if servers:
                self.index_node = servers[0].split(":")[0]

        if hasattr(test, "ALL_BUCKETS"):
            buckets = None
        else:
            buckets = test.test_config.buckets[:1]
        if hasattr(test, "ALL_HOSTNAMES"):
            hostnames = tuple(test.cluster_spec.yield_hostnames())
        else:
            hostnames = None

        self.settings = type(
            "settings",
            (object,),
            {
                "seriesly_host": test.test_config.stats_settings.seriesly["host"],
                "cbmonitor_host_port": test.test_config.stats_settings.cbmonitor["host"],
                "interval": test.test_config.stats_settings.interval,
                "secondary_statsfile": test.test_config.stats_settings.secondary_statsfile,
                "buckets": buckets,
                "hostnames": hostnames,
                "sync_gateway_nodes": test.remote.gateways if test.remote else None,
                "monitor_clients": test.cluster_spec.workers if test.test_config.test_case.monitor_clients else None,
            },
        )()
        self.lat_interval = test.test_config.stats_settings.lat_interval
        if test.cluster_spec.ssh_credentials:
            self.settings.ssh_username, self.settings.ssh_password = test.cluster_spec.ssh_credentials
        self.settings.rest_username, self.settings.rest_password = test.cluster_spec.rest_credentials
        self.settings.bucket_password = test.test_config.bucket.password

        self.settings.index_node = self.index_node

        self.collectors = []
        self.processes = []
        self.snapshots = []
        self.bandwidth = False
开发者ID:sandipnd,项目名称:perfrunner,代码行数:54,代码来源:cbmonitor.py

示例14: __init__

    def __init__(self, cluster_spec: ClusterSpec, test_config: TestConfig,
                 verbose: bool):
        self.cluster_spec = cluster_spec
        self.test_config = test_config
        self.remote = RemoteHelper(cluster_spec, verbose)

        self.workers = cycle(self.cluster_spec.workers)

        self.terminate()
        self.start()
        self.wait_until_workers_are_ready()
开发者ID:couchbase,项目名称:perfrunner,代码行数:11,代码来源:worker.py

示例15: __init__

    def __init__(self, cluster_spec, options):
        self.remote = RemoteHelper(cluster_spec, None, options.verbose)
        self.cluster_spec = cluster_spec

        arch = self.remote.detect_arch()
        pkg = self.remote.detect_pkg()
        release, build = options.version.split('-')
        self.SHERLOCK_BUILDS = 'http://latestbuilds.hq.couchbase.com/couchbase-server/sherlock/{}/'.format(build)

        self.build = Build(arch, pkg, options.version, release, build,
                           options.toy)
        logger.info('Target build info: {}'.format(self.build))
开发者ID:abhi-bit,项目名称:perfrunner,代码行数:12,代码来源:install.py


注:本文中的perfrunner.helpers.remote.RemoteHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。