Bug 1273673: log phases of taskgraph generation; r?gps draft
authorDustin J. Mitchell <dustin@mozilla.com>
Wed, 18 May 2016 15:54:30 +0000
changeset 368346 2662ced404b4e6826d3d63fb8a53ec1cb2addd62
parent 368345 dd215d63ccec6f945638dcc661d0849660def3b8
child 368348 edfce7f50cf67a0e1c449b4764a63f872b7795e9
push id18491
push userdmitchell@mozilla.com
push dateWed, 18 May 2016 15:54:48 +0000
reviewersgps
bugs1273673
milestone49.0a1
Bug 1273673: log phases of taskgraph generation; r?gps MozReview-Commit-ID: 1raUmGXSS8b
taskcluster/taskgraph/generator.py
--- a/taskcluster/taskgraph/generator.py
+++ b/taskcluster/taskgraph/generator.py
@@ -125,50 +125,54 @@ class TaskGraphGenerator(object):
             for a in impl_module.split('.')[1:]:
                 impl_class = getattr(impl_class, a)
             for a in impl_object.split('.'):
                 impl_class = getattr(impl_class, a)
 
             yield impl_class(path, config)
 
     def _run(self):
+        logger.info("Generating full task set")
         all_tasks = {}
         for kind in self._load_kinds():
             for task in kind.load_tasks(self.parameters):
                 if task.label in all_tasks:
                     raise Exception("duplicate tasks with label " + task.label)
                 all_tasks[task.label] = task
 
         full_task_set = TaskGraph(all_tasks, Graph(set(all_tasks), set()))
         yield 'full_task_set', full_task_set
 
+        logger.info("Generating full task graph")
         edges = set()
         for t in full_task_set:
             for dep, depname in t.kind.get_task_dependencies(t, full_task_set):
                 edges.add((t.label, dep, depname))
 
         full_task_graph = TaskGraph(all_tasks,
                                     Graph(full_task_set.graph.nodes, edges))
         yield 'full_task_graph', full_task_graph
 
+        logger.info("Generating target task set")
         target_tasks = set(self.target_tasks_method(full_task_graph, self.parameters))
-
         target_task_set = TaskGraph(
             {l: all_tasks[l] for l in target_tasks},
             Graph(target_tasks, set()))
         yield 'target_task_set', target_task_set
 
+        logger.info("Generating target task graph")
         target_graph = full_task_graph.graph.transitive_closure(target_tasks)
         target_task_graph = TaskGraph(
             {l: all_tasks[l] for l in target_graph.nodes},
             target_graph)
         yield 'target_task_graph', target_task_graph
 
         # optimization is not yet implemented
 
+        logger.info("Generating optimized task graph")
         yield 'optimized_task_graph', target_task_graph
 
     def _run_until(self, name):
         while name not in self._run_results:
             try:
                 k, v = self._run.next()
             except StopIteration:
                 raise AttributeError("No such run result {}".format(name))