Skip to content

Commit

Permalink
update placement time of pushed placement
Browse files Browse the repository at this point in the history
  • Loading branch information
1ntEgr8 committed Nov 29, 2024
1 parent 25f4a3d commit 53cbdc6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def event_representation_filter(record):
self.__log_utilization(self._simulator_time)

# Internal data.
self._last_scheduler_start_time = self._simulator_time
self._last_scheduler_start_time = EventTime.invalid()
self._next_scheduler_event = None
self._last_scheduler_placements: Optional[Placements] = None

Expand Down Expand Up @@ -582,6 +582,10 @@ def __handle_scheduler_start(self, event: Event) -> None:
Args:
event (`Event`): The event to handle.
"""

if self._last_scheduler_start_time == event.time:
return

# Log the required CSV information.
currently_placed_tasks = self._worker_pools.get_placed_tasks()
schedulable_tasks = self._workload.get_schedulable_tasks(
Expand Down Expand Up @@ -1430,6 +1434,7 @@ def __handle_task_placement(self, event: Event, workload: Workload) -> None:
task=event.task,
placement=event.placement,
)
event.placement._placement_time = next_placement_time
self._future_placement_events[task.id] = next_placement_event
self._event_queue.add_event(next_placement_event)
self._logger.info(
Expand Down

0 comments on commit 53cbdc6

Please sign in to comment.