From f5d174948bf4e2fa6fca8024168a40af922a30a9 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 17 Feb 2014 13:29:28 -0400 Subject: add line_profiler targets to Makefile --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 564fbe15..25d2bcf5 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,10 @@ COMPILED_RESOURCES = $(RESOURCES:%.qrc=$(COMPILED_DIR)/%_rc.py) DEBVER = $(shell dpkg-parsechangelog | sed -ne 's,Version: ,,p') +ifndef EDITOR + export EDITOR=vim +endif + # all : resources ui @@ -67,5 +71,11 @@ apidocs: mailprofile: gprof2dot -f pstats /tmp/leap_mail_profile.pstats -n 0.2 -e 0.2 | dot -Tpdf -o /tmp/leap_mail_profile.pdf +do_lineprof: + LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --offline --debug + +view_lineprof: + @python -m line_profiler app.py.lprof | $(EDITOR) - + clean : $(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc) -- cgit v1.2.3