diff --git a/tests/weighted_friend_readonly.py b/tests/weighted_friend_readonly.py index dd9e55d..8bd4121 100644 --- a/tests/weighted_friend_readonly.py +++ b/tests/weighted_friend_readonly.py @@ -32,6 +32,7 @@ hits = [] start = time.time() curr_user = generate_random() +last_user = curr_user for i in tqdm(range(10000)): url = baseurl + "/user/" + curr_user response = requests.get(url) @@ -39,9 +40,10 @@ for i in tqdm(range(10000)): times.append(content["time_ms"]) hits.append(content["source"] == "cache") if fetch_friend(chance_of_selecting_friend): - curr_user = generate_random_friend(curr_user) + curr_user = generate_random_friend(last_user) else: curr_user = generate_random() + last_user = curr_user end = time.time() print_report(hits, times, end - start) \ No newline at end of file