jazzband / django-silk

Silky smooth profiling for Django
MIT License
4.35k stars 333 forks source link

Allow to use explain flags without analyze #653

Open glujan opened 1 year ago

glujan commented 1 year ago

In #558 support for specifying EXPLAIN flags was introduced, as requested in #530. However it only works when setting SILKY_ANALYZE_QUERIES to True.

I don't want to use EXPLAIN ANALYZE but would like to use SILKY_EXPLAIN_FLAGS with EXPLAIN which is currently impossible.

This PR is a proposal to allow such a behaviour.

codecov[bot] commented 1 year ago

Codecov Report

Merging #653 (84ef385) into master (274898f) will decrease coverage by 0.01%. The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
- Coverage   86.51%   86.50%   -0.01%     
==========================================
  Files          52       52              
  Lines        2091     2090       -1     
==========================================
- Hits         1809     1808       -1     
  Misses        282      282              
Impacted Files Coverage Δ
silk/sql.py 78.46% <86.66%> (-0.33%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more