Created
November 22, 2011 17:26
-
-
Save farshidce/1386282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
import uuid | |
sys.path.append(".") | |
sys.path.append("lib") | |
from mc_bin_client import MemcachedClient | |
from memcached.helper.data_helper import MemcachedClientHelper | |
c = MemcachedClient("localhost",11210) | |
size = 2048 | |
count = 10000 | |
value = MemcachedClientHelper.create_value("*",size) | |
postfix = str(uuid.uuid4()) | |
keys = ["{0}-{1}".format(i,postfix) for i in range(0,count)] | |
for key in keys: | |
c.set(key,0,0,value) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment