perf_engines Package

cbsoda Module

class cbtestlib.perf_engines.cbsoda.P
error(m)
info(m)
class cbtestlib.perf_engines.cbsoda.Reader(src, reader_go, reader_done, cur)

Bases: threading.Thread

run()
class cbtestlib.perf_engines.cbsoda.StoreCouchbase

Bases: cbtestlib.perf_engines.mcsoda.StoreMembaseBinary

cmd_append(cmd, key_num, key_str, data, expiration, grp)
connect_host_port(host, port, user, pswd, bucket='default')
disconnect()

Close socket connection

inflight_complete(inflight_grp)
inflight_recv(inflight, inflight_grp, expectBuffer=None)
inflight_send(t)
inflight_start()
init_reader(skt)
restart_connection()

Determine new hostname, drop existing connection, establish new socket connection.

mcsoda Module

class cbtestlib.perf_engines.mcsoda.P
error(m)
info(m)
class cbtestlib.perf_engines.mcsoda.Store

Bases: object

add_timing_sample(cmd, delta, prefix='latency-')
cmd_line_get(key_num, key_str)
command(c)
connect(target, user, pswd, cfg, cur, bucket='default')
drange(start, stop, step)
flush()
gen_doc(key_num, key_str, min_value_size, json=None, cache=None)
histo_bucket(samp)
num_ops(cur)
readbytes(skt, nbytes, buf)
show_some_keys()
stats_collector(sc)
class cbtestlib.perf_engines.mcsoda.StoreMembaseBinary

Bases: cbtestlib.perf_engines.mcsoda.StoreMemcachedBinary

connect_host_port(host, port, user, pswd, bucket='default')

Connect to the server host using REST API. Username and password should be rest_username and rest_password, generally they are different from ssh identities.

flush_level()
inflight_append_buffer(grp, vbucketId, opcode, opaque)
inflight_complete(inflight_grp)
inflight_recv(inflight, inflight_grp, expectBuffer=None)
inflight_send(inflight_msg)

If timeout value is 0, blocks until everything been sent out or the connection breaks.

inflight_start()
recvMsgSockBuf(sock, buf)
class cbtestlib.perf_engines.mcsoda.StoreMemcachedAscii

Bases: cbtestlib.perf_engines.mcsoda.Store

command(c)
command_recv(cmd, key_num, key_str, data, expiration)
command_send(cmd, key_num, key_str, data, expiration)
connect(target, user, pswd, cfg, cur, bucket='default')
flush()
num_ops(cur)
readline(skt, buf)
class cbtestlib.perf_engines.mcsoda.StoreMemcachedBinary

Bases: cbtestlib.perf_engines.mcsoda.Store

cmd_append(cmd, key_num, key_str, data, expiration, grp)
command(c)
connect(target, user, pswd, cfg, cur, bucket='default')
connect_host_port(host, port, user, pswd, bucket='default')
create_seed()

Return a seed (hashable tuple or int value) based on current stats. This seed ensures reproducible randomness for the same test configurations.

flush()
flush_level()
get_vbucketId(key)
header(op, key, val, opaque=0, extra='', cas=0, dtype=0, fmt='>BBHBBHIIQ', magic=128)
inflight_append_buffer(grp, vbucketId, opcode, opaque)
inflight_complete(inflight_arr)
inflight_recv(inflight, inflight_arr, expectBuffer=None)
inflight_reinit(inflight=0)
inflight_send(inflight_msg)
inflight_start()
num_ops(cur)
recvMsg()
save_stats(cur_time=0)
cbtestlib.perf_engines.mcsoda.choose_entry(arr, n)
cbtestlib.perf_engines.mcsoda.choose_key_num(num_items, ratio_hot, ratio_hot_choice, num_ops, base, random_key, cur)

Choose a random or deterministic number in order to generate the MD5 hash.

The deterministic algorithm always favors new items. i.e:

If many items have been created (num_creates > num_hot_items), hot items are chosen from the newest guys.
cbtestlib.perf_engines.mcsoda.dict_to_s(d, level='', res=None, suffix=', ', ljust=None)
cbtestlib.perf_engines.mcsoda.dict_to_s_inner(d, level, res, suffix, ljust)
cbtestlib.perf_engines.mcsoda.gen_doc_string(key_num, key_str, min_value_size, suffix, json, cache=None, key_name='key', suffix_ex='', whitespace=True)
cbtestlib.perf_engines.mcsoda.histo_percentile(histo, percentiles)
cbtestlib.perf_engines.mcsoda.key_to_achievements(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_category(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_city(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_coins(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_country(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_email(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_name(key_num, key_str)
cbtestlib.perf_engines.mcsoda.key_to_realm(key_num, key_str)
cbtestlib.perf_engines.mcsoda.main(argv, cfg_defaults=None, cur_defaults=None, protocol=None, stores=None, extra_examples=None)
cbtestlib.perf_engines.mcsoda.next_cmd(cfg, cur, store)
cbtestlib.perf_engines.mcsoda.obs_cb(store)

callback for observe thread.

cbtestlib.perf_engines.mcsoda.positive(x)
cbtestlib.perf_engines.mcsoda.prepare_key(key_num, prefix=None)
cbtestlib.perf_engines.mcsoda.run(cfg, cur, protocol, host_port, user, pswd, stats_collector=None, stores=None, ctl=None, heartbeat=0, why='', bucket='default')
cbtestlib.perf_engines.mcsoda.run_worker(ctl, cfg, cur, store, prefix, heartbeat=0, why='')
cbtestlib.perf_engines.mcsoda.woq_worker(req_queue, stats_queue, ctl, cfg, store)

measure latencies of standard write/observe/query patterns

mcsoda_mongo Module

class cbtestlib.perf_engines.mcsoda_mongo.StoreMongo

Bases: cbtestlib.perf_engines.mcsoda.Store

command(c)
connect(target, user, pswd, cfg, cur, bucket=None)
gen_doc(key_num, key_str, min_value_size, json=None, cache=None)

sys_helper Module

class cbtestlib.perf_engines.sys_helper.SocketHelper
static recv_bytes(skt, length, timeout=0)

Receive bytes from the socket @raise ValueError, IOError, socket.timeout, Exception

static recv_bytes_ex(skt, length, timeout=0)

Receive bytes to the socket. Swallow exceptions.

static send_bytes(skt, buf, timeout=0)

Send bytes to the socket @raise ValueError, IOError, socket.timeout, Exception

static send_bytes_ex(skt, buf, timeout=0)

Send bytes to the socket. Swallow exceptions.

cbtestlib.perf_engines.sys_helper.synchronized(lock_name)

synchronized access to class method

Table Of Contents

Previous topic

old_tasks Package

Next topic

libobserve Package

This Page