You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
436 B
14 lines
436 B
# yum -y install python3
|
|
# pip3 install redis -i https://pypi.douban.com/simple/
|
|
import datetime
|
|
|
|
import redis
|
|
|
|
if __name__ == '__main__':
|
|
r = redis.Redis(host='10.10.14.199', port=18890, db=0, password='')
|
|
r.delete("name")
|
|
start = datetime.datetime.now()
|
|
for i in range(1, 100001):
|
|
r.rpush("name", "key_" + str(i))
|
|
end = datetime.datetime.now()
|
|
print('程序运行时间为: %s Seconds' % (end - start)) |