dir = "D://05性能测试//para//"
file_name = "redis_data_script"
fo = open(dir + file_name, "a",encoding='utf-8')
start_time = datetime.now()
for i in range(1000000,5000000):
fo.write("*4" + "
" + "$5" + "
" + "setex" + "
" + "$46" + "
" + "LOGIN_SERVICE_2cb1ba580bef4577ac0ed91aa" + str(i) + "
" + "$5" + "
" + "86400" + "
" + "$80" + "
" + "{"endPoint":"Applet","companyId":523144769413586666,"userId":530854902100926666}" + "
")
fo.close()
end_time = datetime.now()
print(("总运行耗时: {}".format((end_time - start_time).seconds)))