summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-02-17 13:29:28 -0400
committerKali Kaneko <kali@leap.se>2014-02-17 13:29:28 -0400
commitf5d174948bf4e2fa6fca8024168a40af922a30a9 (patch)
tree30de6932d54579c9b778bfd7bdf6007b12897cea /Makefile
parent9d68551773a7f428e28a84e30598583c69837238 (diff)
add line_profiler targets to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
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)