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

Support memory profiling with Scalene and add flag to ./run.sh. #2260

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rocodes
Copy link
Contributor

@rocodes rocodes commented Oct 16, 2024

Status

Ready for review

Description

Support memory profiling of the client via Scalene and allow for usage via ./run.sh.

Scalene is a profiling tool that lets you check CPU, memory usage, identify suspected memory leaks, etc. It can be enabled programatically, run on certain tests, or used to run and profile an entire application.

Screenshot 2024-10-16 at 11-00-55 Scalene - home_user_projects_securedrop-client_client_securedrop_client___main_ py

Test Plan

  • Visual review
  • Team discussion?
  • CI passes (note: not enabled in ci, do we want that?)
  • Check out this branch, poetry install, then ./run.sh --memprofile (Tested already in combination with the other cli opts like --sdc-home in any position, but feel free to test as well). Wait about 5 seconds, then see the web gui appear.
  • Client launches and runs successfully with and without memory profiling enabled

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration is self-contained and applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant