def issue(self):
     clients = []
     num_threads, client_indexes = self.input()
     for i in range(len(client_indexes)):
         clients.append(Client(client_indexes[i]))
     logging.msg('issuing requests for memcached_bug_127\n')
     self.mc = memcache.Client(['127.0.0.1:12345'], debug=0)
     self.mc.set('test', '0')
     for i in range(len(clients)):
         clients[i].start()
     for i in range(len(clients)):
         clients[i].join()
def __client_3():
    mc = memcache.Client(['127.0.0.1:12345'], debug=0)
    mc.set('key', '5')
    for i in range(10):
        val = mc.get('key')
def __client_1():
    mc = memcache.Client(['127.0.0.1:12345'], debug=0)
    mc.incr('test', 10)
Пример #4
0
def __client_6():
    mc = memcache.Client(['127.0.0.1:12345'], debug=0)
    mc.set('key', '50')
    for i in range(10):
        mc.decr('key')
Пример #5
0
def __client_4():
    mc = memcache.Client(['127.0.0.1:12345'], debug=0)
    for i in range(10):
        val = mc.set('key', '%d' % i)
Пример #6
0
def __client_1():
    mc = memcache.Client(['127.0.0.1:12345'], debug=0)
    for i in range(10):
        mc.set('key%d' % i, '%d' % (i * 10))
    for i in range(10):
        val = mc.get('key%d' % i)