From 685939c18cf064163ca5554a825cbc3fec0a0338 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Sat, 20 Jul 2024 11:41:05 -0600 Subject: [PATCH] Instructions to generate speedscope profiles using `py-spy` (#5814) [Preview](https://docs-getdbt-com-git-dbeatty10-patch-2-dbt-labs.vercel.app/reference/global-configs/record-timing-info) ## What are you changing in this pull request and why? Officially documenting the performance profiling approach mentioned in https://github.com/dbt-labs/dbt-core/issues/10434#issuecomment-2225788062. ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. --- .../docs/reference/global-configs/record-timing-info.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/docs/reference/global-configs/record-timing-info.md b/website/docs/reference/global-configs/record-timing-info.md index 503c8de3fe9..3caccfc5e4f 100644 --- a/website/docs/reference/global-configs/record-timing-info.md +++ b/website/docs/reference/global-configs/record-timing-info.md @@ -15,3 +15,10 @@ $ snakeviz timing.txt ``` + +Alternatively, you can use [`py-spy`](https://github.com/benfred/py-spy) to collect [speedscope](https://github.com/jlfwong/speedscope) profiles of dbt commands like this: + +```shell +python -m pip install py-spy +sudo py-spy record -s -f speedscope -- dbt parse +```