Skip to content

Commit

Permalink
Set correct completion time for finishing Tasks
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rohanbafna committed Dec 15, 2024
1 parent 3491d59 commit 7275702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7275702

Please sign in to comment.