-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbt builtin profiler #1020
dbt builtin profiler #1020
Conversation
Here's an example output, visualized in snakeviz: The most obvious low-hanging fruit here is that The more complex one (and also a bigger win if we can untangle it) is the loader -- it takes around 60% of the total run time. Half of that is spent in Jinja parsing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! And this is great data to have, I think we could make a lot of great perf decisions with the help of this tool.
I pulled this branch locally, keen to see what is happening in my own projects.. and I get an error running any dbt command :( This is the output of
It looks like it's not liking something in the pageup_dbt_utils project. Removing that project and all references fixes the issue, not sure exactly what the issue is though. |
@elexisvenator do you also get this error on the |
It's caused by the format of the
with no data inside it as |
@beckjake I think the desired default would be |
from pstats import Stats | ||
|
||
|
||
@contextmanager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work on py2 and py3? And does it have any impact on error handling?
I built a very blunt profiling tool to use with dbt. You can use it with the
--record-timing-info
or-r
flags. So,dbt -r output.profile compile
will run that command, writing profiler output tooutput.profile
.Fixes #1001