Example #1
0
def load(db, target=None):
    """Starts loading of data to the database"""
    timestamp = base_time()
    print green(timestamp, bold = True)
    clientno = _client_no()
    database = get_db(db)
    with cd(database['home']):
        if target is not None:
            part = int(target) / len(env.roledefs['client'])
            run(_at(_ycsbloadcmd(database, clientno, timestamp, part), timestamp))
        else:
            run(_at(_ycsbloadcmd(database, clientno, timestamp), timestamp))
Example #2
0
def run_workload(db, workload, target=None):
    """Starts running of the workload"""
    timestamp = base_time()
    print green(timestamp, bold = True)
    database = get_db(db)
    load = get_workload(workload)
    with cd(database['home']):
        if target is not None:
            part = int(target) / len(env.roledefs['client'])
            run(_at(_ycsbruncmd(database, load, timestamp, part), timestamp))
        else:
            run(_at(_ycsbruncmd(database, load, timestamp), timestamp))
Example #3
0
File: ycsb.py Project: yife/ycsb
def run_workload(db, workload, target=None):
    """Starts running of the workload"""
    timestamp = base_time()
    print green(timestamp, bold=True)
    database = get_db(db)
    load = get_workload(workload)
    with cd(database['home']):
        if target is not None:
            part = int(target) / len(env.roledefs['client'])
            run(_at(_ycsbruncmd(database, load, timestamp, part), timestamp))
        else:
            run(_at(_ycsbruncmd(database, load, timestamp), timestamp))
Example #4
0
File: ycsb.py Project: yife/ycsb
def load(db, target=None):
    """Starts loading of data to the database"""
    timestamp = base_time()
    print green(timestamp, bold=True)
    clientno = _client_no()
    database = get_db(db)
    with cd(database['home']):
        if target is not None:
            part = int(target) / len(env.roledefs['client'])
            run(
                _at(_ycsbloadcmd(database, clientno, timestamp, part),
                    timestamp))
        else:
            run(_at(_ycsbloadcmd(database, clientno, timestamp), timestamp))
Example #5
0
 def inner_submit_workload():
     with cd(dir_name):
         param = int(target) / len(
             the_hosts) if target is not None else None
         # command = prepare_ycsbruncmd(database, load, the_time, param)
         command = _at(
             prepare_ycsbruncmd(the_hosts, dir_name, database, load,
                                the_time, param), the_time)
         run(command)
Example #6
0
 def inner():
     command = _at(prepare_startcmd(database), the_time)
     run(command, shell=True)
Example #7
0
 def inner():
     command = _at(prepare_startcmd(database), the_time)
     run(command, shell=True)
Example #8
0
 def inner_submit_workload():
     with cd(dir_name):
         param = int(target) / len(the_hosts) if target is not None else None
         # command = prepare_ycsbruncmd(database, load, the_time, param)
         command = _at(prepare_ycsbruncmd(the_hosts, dir_name, database, load, the_time, param), the_time)
         run(command)
Example #9
0
 def inner():
     with cd(self.dir_name):
         command = _at(prepare_startcmd(database), the_time)
         run(command)
Example #10
0
#!/usr/bin/python
import sys, os

sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # ugly hack to allow import from the root
from fabfile.helpers import _at
from conf.databases import databases

print _at(databases['couchbase2']['failover']['kill_command']);
print _at(databases['couchbase2']['failover']['start_command']);