You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/05/31 06:07:04 UTC

[GitHub] [airflow] XD-DENG commented on a change in pull request #5350: [AIRFLOW-4716] Instrument dag loading time duration

XD-DENG commented on a change in pull request #5350: [AIRFLOW-4716] Instrument dag loading time duration
URL: https://github.com/apache/airflow/pull/5350#discussion_r289266898
 
 

 ##########
 File path: airflow/models/dagbag.py
 ##########
 @@ -391,6 +391,10 @@ def collect_dags(
             'dagbag_import_errors', len(self.import_errors), 1)
         self.dagbag_stats = sorted(
             stats, key=lambda x: x.duration, reverse=True)
+        for file_stat in self.dagbag_stats:
+            Stats.timing('dag.loading-duration.{}'.
+                         format(str([dag.dag_id for dag in file_stat.dags])),
 
 Review comment:
   Hi @feng-tao , based on lines https://github.com/apache/airflow/blob/65a2e1b66dd8b3f31f23579c2aaed13174e3316f/airflow/models/dagbag.py#L377-L383, `file_stat.dags` here is a **string** rather than a **list of string**. It may mean that your list comprehension here is not working as you intended?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services