Measuring and comparing DAGs' parse time locally #46578
Unanswered
AlvaroCavalcante
asked this question in
Show and tell
Replies: 1 comment
-
Nice. You likely want to make a PR and add it to https://airflow.apache.org/ecosystem/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's convenient to parse DAGs locally, as you can easily measure if your code modifications effectively reduce your DAG's parse time!
For this reason, I've created a simple Python library called airflow-parse-bench, that can help you to parse, measure, and compare your DAG parse time on your local machine.
To do so, you just need to install the lib by running the following:
After that, you can measure your DAG parse time by running this command:
It will result in a table including the following columns:
Filename: The name of the Python module containing the DAG. This unique name is the key to store DAG information.
Current Parse Time: The time (in seconds) taken to parse the DAG.
Previous Parse Time: The parse time from the previous run.
Difference: The difference between the current and previous parse times.
Best Parse Time: The best parse time recorded for the DAG.
If you have any doubts, check the project repository!
Beta Was this translation helpful? Give feedback.
All reactions