Skip to content

Commit

Permalink
Change the position of start_time in test_performance_ema_threadsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
mryab committed Jul 14, 2024
1 parent 37b3251 commit f151e23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_util_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ def run_task(ema, start_event, task_size):
with ThreadPoolExecutor(max_workers) as pool:
ema = PerformanceEMA(alpha=alpha)
start_event = Event()
start_time = time.perf_counter()

futures = []
for _ in range(num_updates):
Expand All @@ -578,6 +577,7 @@ def run_task(ema, start_event, task_size):

ema.reset_timer()
start_event.set()
start_time = time.perf_counter()
total_size = sum(future.result() for future in as_completed(futures))
end_time = time.perf_counter()
target = total_size / (end_time - start_time)
Expand Down

0 comments on commit f151e23

Please sign in to comment.