summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-04-09 16:24:12 -0500
committerKali Kaneko <kali@leap.se>2014-04-09 16:24:12 -0500
commitcf9fb29fd1098f694974ee60e5673f22e286d859 (patch)
tree5cdc4210b8c944ee4f2669fd8096998d507beda3 /Makefile
parentf0232265a2725d8129b472479dd380b9ec3ca6b2 (diff)
parent81715dc47d77934c4f67d2527a56c28f58f0345d (diff)
Merge tag '0.5.0' into deb-0.5.0
Tag leap.bitmask version 0.5.0 Conflicts: pkg/requirements.pip
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 451380d0..0940a031 100644
--- a/Makefile
+++ b/Makefile
@@ -38,6 +38,14 @@ COMPILED_RESOURCES = $(RESOURCES:%.qrc=$(COMPILED_DIR)/%_rc.py)
DEBVER = $(shell dpkg-parsechangelog | sed -ne 's,Version: ,,p')
+ifndef EDITOR
+ export EDITOR=vim
+endif
+
+ifndef RESOURCE_TIME
+ export RESOURCE_TIME=10
+endif
+
#
all : resources ui
@@ -69,5 +77,28 @@ manpages:
apidocs:
@sphinx-apidoc -o docs/api src/leap/bitmask
+do_cprofile:
+ python -m cProfile -o bitmask.cprofile src/leap/bitmask/app.py --debug -N
+
+view_cprofile:
+ cprofilev bitmask.cprofile
+
+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 --debug
+
+do_lineprof_offline:
+ LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --offline --debug -N
+
+view_lineprof:
+ @python -m line_profiler app.py.lprof | $(EDITOR) -
+
+resource_graph:
+ #./pkg/scripts/monitor_resource.zsh `ps aux | grep app.py | head -1 | awk '{print $$2}'` $(RESOURCE_TIME)
+ ./pkg/scripts/monitor_resource.zsh `pgrep bitmask` $(RESOURCE_TIME)
+ display bitmask-resources.png
+
clean :
$(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc)