From 727570260c03337f9c5f43ea0276fcf112cd585a Mon Sep 17 00:00:00 2001 From: Rohan Bafna <130247393+rohanbafna@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:36:09 -0500 Subject: [PATCH] Set correct completion time for finishing Tasks On a TASK_FINISH event, set the task completion time to the time of the event rather than the last time the task was stepped. Resolves a bug in the service where tasks that finish later than the simulator's profiled runtime predicts get assigned the wrong completion time. --- simulator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulator.py b/simulator.py index 6de1cee2..a752c58f 100644 --- a/simulator.py +++ b/simulator.py @@ -1232,7 +1232,7 @@ def __handle_task_finished(self, event: Event) -> None: # Remove the task from it's task graph's current placements del self._current_task_graph_placements[event.task.task_graph][event.task.id] - event.task.finish() + event.task.finish(event.time) # Log the TASK_FINISHED event into the CSV. self._finished_tasks += 1