Skip to content

Instantly share code, notes, and snippets.

@farshidce
Created November 22, 2011 17:26
Show Gist options
  • Save farshidce/1386282 to your computer and use it in GitHub Desktop.
Save farshidce/1386282 to your computer and use it in GitHub Desktop.
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