Skip to content

Commit

Permalink
make: add targets to debug updater memory usage with memray
Browse files Browse the repository at this point in the history
  • Loading branch information
timlau committed Jun 24, 2024
1 parent 226104c commit 081f687
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ yumex/constants.py


sandbox/

profile/
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,23 @@ run-tests:
# run unit tests and generate html coverage report
run-test-report:
pytest --cov --cov-report html

# dnf5 install python3-memray
memray-updater:
@systemctl --user stop yumex-updater-systray.service
@$(MAKE) localbuild
@-mkdir -p profile
@-rm profile/output.bin
@-rm profile/memray-flamegraph-output.html
@-python3 -m memray run -o profile/output.bin ./builddir/bin/yumex_updater_systray
@-python3 -m memray flamegraph profile/output.bin

# dnf5 install python3-memray
memray-updater-live:
@-systemctl --user stop yumex-updater-systray.service
@$(MAKE) localbuild
@-mkdir -p profile
@-python3 -m memray run --live ./builddir/bin/yumex_updater_systray



0 comments on commit 081f687

Please sign in to comment.