harvard-lil / perma

Indelible links
424 stars 71 forks source link

Performance tweaks for reporting #3649

Closed rebeccacremona closed 3 weeks ago

rebeccacremona commented 3 weeks ago

Yesterday, I was not able to use the Django admin or our internal stats page the way I wanted to, to monitor how captures were going.

So, I fired up Perma locally with a production-like database and loaded those pages with Django debug toolbar, and looked at the SQL... turns out we were missing some indices. There were also a couple things I added to the admin pages during the Perma -> Scoop transition last year that were gumming up the works, so I removed them.

I am hopeful that all three pages (Link admin, CaptureJob admin, internal stats page) will become usable again 🤞. The effect locally was significant.

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 69.64%. Comparing base (1d33584) to head (3489de8). Report is 20 commits behind head on develop.

Files with missing lines Patch % Lines
perma_web/perma/views/admin_stats.py 0.00% 4 Missing :warning:
perma_web/perma/admin.py 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3649 +/- ## =========================================== - Coverage 69.65% 69.64% -0.02% =========================================== Files 54 54 Lines 7339 7353 +14 =========================================== + Hits 5112 5121 +9 - Misses 2227 2232 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.