jazzband / django-silk

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

Use Django 2.0 execute_wrapper() #631

Open SebCorbin opened 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Merging #631 (1d0d131) into master (5677fa8) will increase coverage by 0.43%. The diff coverage is 95.55%.

@@            Coverage Diff             @@
##           master     #631      +/-   ##
==========================================
+ Coverage   86.33%   86.77%   +0.43%     
==========================================
  Files          52       52              
  Lines        2093     2094       +1     
==========================================
+ Hits         1807     1817      +10     
+ Misses        286      277       -9     
Impacted Files Coverage Δ
silk/sql.py 92.53% <94.73%> (+13.74%) :arrow_up:
silk/apps.py 100.00% <100.00%> (ø)
silk/middleware.py 88.77% <100.00%> (-0.55%) :arrow_down:

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

ulgens commented 1 year ago

@SebCorbin Can you please give some details about this PR and its purpose? Thank you.

SebCorbin commented 1 year ago

@ulgens yes, see the related issue and last comment https://github.com/jazzband/django-silk/issues/214#issuecomment-1321204137

SebCorbin commented 1 year ago

After few days of real-world testing, the ready() method is not development-proof with the runserver command. I'll update this PR to switch to classic context manager on the middleware.

SebCorbin commented 1 year ago

Another option: rely on connection_created signal