summaryrefslogtreecommitdiff
path: root/pkg/tools/profile.mk
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2016-02-11 13:34:46 -0800
committerKali Kaneko <kali@leap.se>2016-04-18 16:17:26 -0400
commitd01772d0a83535bf45fa43786213a9a0fcb232bc (patch)
treec97764258125debe1e36071a5e893d297040ab02 /pkg/tools/profile.mk
parent9affaaacb18598fc98be669ef1c086b0afe4ad91 (diff)
[refactor] cleanup helper usage to adapt to new one
also cleanups build process
Diffstat (limited to 'pkg/tools/profile.mk')
-rw-r--r--pkg/tools/profile.mk23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/tools/profile.mk b/pkg/tools/profile.mk
new file mode 100644
index 00000000..8d45c01a
--- /dev/null
+++ b/pkg/tools/profile.mk
@@ -0,0 +1,23 @@
+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
+