Skip to content
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

Profiling NewRelic 8.11.0 #2317

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Profiling NewRelic 8.11.0 #2317

wants to merge 12 commits into from

Conversation

jimleroyer
Copy link
Member

DO NOT MERGE INTO STAGING

Summary | Résumé

This adds timer and profiler around the application's initialization for capturing metrics around New Relic startup.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

Deploy to the dev environment, look at the startup logs and grab the report in the application running folder named profile_report.txt.

Release Instructions | Instructions pour le déploiement

Release to the dev environment, not to staging. This will affect the workers # if merged.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@jimleroyer jimleroyer self-assigned this Oct 2, 2024
if enable_profiling:
print("Profiling enabled")
import cProfile
import pstats

Check notice

Code scanning / CodeQL

Module is imported with 'import' and 'import from' Note

Module 'pstats' is imported with both 'import' and 'import from'.
@jimleroyer jimleroyer marked this pull request as draft November 13, 2024 16:06
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