Пример #1
0
def runner_a():
    data = Data(PREFIX+DATAFILE1)
    mc = Client(data, freq=CMD_FREQ)
    for bucket in sorted(data.buckets):
        mc.setter_fixed_random(bucket, DURATION)
Пример #2
0
def runner_b():
    data = Data(PREFIX+DATAFILE2)
    mc = Client(data, freq=CMD_FREQ)
    time.sleep(DURATION * len(data.buckets) * 2)
    for bucket in sorted(data.buckets):
        mc.setter_fixed_random(bucket, DURATION)
Пример #3
0
def worker(data):
    mc = Client(data, freq=FREQ)
    mc.setter_random_random(DURATION)
Пример #4
0
'''

import sys
import os.path
import random

from lib.utilities import *
from lib.common import Client, Data

DURATION = 5
FREQ = 100

server = startServer()
data = Data(os.path.expanduser(TESTS_PATH) + '/data/data.config')

mc = Client(data, freq=FREQ)

bucket = data.buckets[random.randrange(len(data.buckets))]
print "Testing setter_fixed_single"
mc.setter_fixed_single(bucket, 1, DURATION)
print "Testing getter_fixed_single"
mc.getter_fixed_single(bucket, 1, DURATION)
bucket = data.buckets[random.randrange(len(data.buckets))]
print "Testing setter_fixed_random"
mc.setter_fixed_random(bucket, DURATION)
print "Testing getter_fixed_random"
mc.getter_fixed_random(bucket, DURATION)
bucket = data.buckets[random.randrange(len(data.buckets))]
print "Testing setter_fixed_unbounded"
mc.setter_fixed_unbounded(bucket, DURATION)
Пример #5
0
'''

import sys
import os.path
import random

from lib.utilities import *
from lib.common import Client, Data

DURATION = 5
FREQ = 100

server = startServer()
data = Data(os.path.expanduser(TESTS_PATH)+'/data/data.config')

mc = Client(data, freq=FREQ)

bucket = data.buckets[random.randrange(len(data.buckets))]
print"Testing setter_fixed_single"
mc.setter_fixed_single(bucket, 1, DURATION)
print"Testing getter_fixed_single"
mc.getter_fixed_single(bucket, 1, DURATION)
bucket = data.buckets[random.randrange(len(data.buckets))]
print"Testing setter_fixed_random"
mc.setter_fixed_random(bucket, DURATION)
print"Testing getter_fixed_random"
mc.getter_fixed_random(bucket, DURATION)
bucket = data.buckets[random.randrange(len(data.buckets))]
print"Testing setter_fixed_unbounded"
mc.setter_fixed_unbounded(bucket, DURATION)
Пример #6
0
def runner_b():
    data = Data(PREFIX + DATAFILE2)
    mc = Client(data, freq=CMD_FREQ)
    time.sleep(DURATION * len(data.buckets) * 2)
    for bucket in sorted(data.buckets):
        mc.setter_fixed_random(bucket, DURATION)
Пример #7
0
def runner_a():
    data = Data(PREFIX + DATAFILE1)
    mc = Client(data, freq=CMD_FREQ)
    for bucket in sorted(data.buckets):
        mc.setter_fixed_random(bucket, DURATION)