Skip to content

Commit

Permalink
Unify deadline assignment for Tasks in Jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed Nov 1, 2023
1 parent 6eaaa3e commit b4e1c2f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions workload/jobs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import random
import sys
import uuid
Expand Down Expand Up @@ -628,6 +627,14 @@ def _generate_task_graph(
resolve_conditionals = False
task_logger = setup_logging(name="Task")

# Generate the deadline for all the Tasks.
# TODO (Sukrit): Right now, this assumes that all Tasks in the TaskGraph come
# with the same deadline. At some point, we will have to implement a
# heuristic-based deadline splitting technique.
task_deadline = release_time + fuzz_time(
self.completion_time, deadline_variance
)

# Generate all the `Task`s from the `Job`s in the graph.
job_to_task_mapping = {}
for job in self.breadth_first():
Expand All @@ -636,10 +643,6 @@ def _generate_task_graph(
if self.is_source(job)
else EventTime(-1, EventTime.Unit.US)
)
task_deadline = release_time + fuzz_time(
self.__get_completion_time(),
deadline_variance,
)
job_to_task_mapping[job.name] = Task(
name=job.name,
task_graph=task_graph_name,
Expand Down

0 comments on commit b4e1c2f

Please sign in to comment.