-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add PRETTIFY_SQL setting to control token grouping in SQL panel #1438
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1438 +/- ##
==========================================
+ Coverage 87.44% 87.46% +0.01%
==========================================
Files 29 29
Lines 1577 1579 +2
Branches 220 221 +1
==========================================
+ Hits 1379 1381 +2
Misses 146 146
Partials 52 52
Continue to review full report at Codecov.
|
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.
Well done! I appreciate the example in the documentation.
docs/configuration.rst
Outdated
@@ -221,6 +221,40 @@ Panel options | |||
The SQL panel highlights queries that took more that this amount of time, | |||
in milliseconds, to execute. | |||
|
|||
* ``PRETTIFY_SQL`` |
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.
Can you move this above PROFILER_MAX_DEPTH
to make the settings alphabetical please?
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.
Done in cbf8f84.
It doesn't validate what PRETTIFY_SQL does explicitly, but that toggling it changes the output.
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.
Thank you for the PR!
As discussed in #1402, this PR expose a new setting, "PRETTIFY_SQL" which controls token grouping in SQL panel.
It is set as True by default in order to preserve current behaviour.
It should be disabled if a django application makes a very long textual SQL query, which will cause a huge slowdown during toolbar render.
This is a new PR (original #1404) to fix some commit issues as reported in this comment.