Skip to content

feat: Instrument compiler via runtime/trace #1258

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

Merged
merged 4 commits into from
Oct 29, 2021
Merged

feat: Instrument compiler via runtime/trace #1258

merged 4 commits into from
Oct 29, 2021

Conversation

kyleconroy
Copy link
Collaborator

For larger projects, it may be helpful to see where sqlc is spending its time during execution. Use the runtime/trace package to instrument the compiler. To turn on tracing, set the trace attribute in SQLCDEBUG:

SQLCDEBUG=trace=1 sqlc-dev generate

This will output trace.out. You can also pick a custom output name.

SQLCDEBUG=trace=foo.out sqlc-dev generate

@kyleconroy kyleconroy marked this pull request as ready for review October 29, 2021 16:07
@kyleconroy kyleconroy merged commit 63a755d into main Oct 29, 2021
@kyleconroy kyleconroy deleted the kyle/trace branch October 29, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant