Couchbase Client Python

韦业
2023-12-01
from couchbase.couchbaseclient import CouchbaseClient
import timeit
client = CouchbaseClient("http://10.10.135.38:8091/pools/default", "default", "")
client.set("key1", 0, 0, "value1")
print client.get("key1")
 
def set_and_get():
    client.set("keyX", 0, 0, "valueX")
    client.get("keyX")
t=timeit.Timer("set_and_get()","from __main__ import set_and_get")
count = 1000
delta = t.timeit(count)
print "QPS: ", count / delta * 2

 类似资料:

相关阅读

相关文章

相关问答