Commit 30c48f55 authored by 赵威's avatar 赵威

update timer

parent e9340e07
......@@ -85,7 +85,6 @@ def main():
device_ids = list(redis_device_df["device_id"].values)[:20]
diary_ids = list(redis_diary_df["card_id"].values)
@time_cost
def test1():
time_1 = timeit.default_timer()
user1 = join_device_diary(random.sample(device_ids, 1)[0], random.sample(diary_ids, 300), redis_device_df, redis_diary_df)
......@@ -97,7 +96,6 @@ def main():
total_1 = (timeit.default_timer() - time_1)
print("total prediction cost {:.5f}s".format(total_1))
@time_cost
def test2():
time_1 = timeit.default_timer()
user1 = join_device_diary(random.sample(device_ids, 1)[0], random.sample(diary_ids, 300), redis_device_df, redis_diary_df)
......@@ -109,7 +107,6 @@ def main():
total_1 = (timeit.default_timer() - time_1)
print("total prediction cost {:.5f}s".format(total_1))
@time_cost
def test3():
time_1 = timeit.default_timer()
user1 = join_device_diary(random.sample(device_ids, 1)[0], random.sample(diary_ids, 300), redis_device_df, redis_diary_df)
......@@ -121,7 +118,6 @@ def main():
total_1 = (timeit.default_timer() - time_1)
print("total prediction cost {:.5f}s".format(total_1))
@time_cost
def test4():
time_1 = timeit.default_timer()
user1 = join_device_diary(random.sample(device_ids, 1)[0], random.sample(diary_ids, 300), redis_device_df, redis_diary_df)
......@@ -133,7 +129,6 @@ def main():
total_1 = (timeit.default_timer() - time_1)
print("total prediction cost {:.5f}s".format(total_1))
@time_cost
def test5():
time_1 = timeit.default_timer()
user1 = join_device_diary(random.sample(device_ids, 1)[0], random.sample(diary_ids, 300), redis_device_df, redis_diary_df)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment