Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
def worker(data):
    mc = Client(data, freq=FREQ)
    mc.setter_random_random(DURATION)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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)