profiling: Add snakeviz to dev tools.

This adds snakeviz to dev tools and also updates the message displayed
upon running `test-backend` with `--profile` option to say how to run
snakeviz correctly when using vagrant development environment.
This commit is contained in:
Aditya Bansal
2017-09-04 18:05:08 +05:30
committed by showell
parent 910f04af29
commit d7f10bf3a1
3 changed files with 7 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ tblib==1.3.2
# Needed to lint Git commit messages
gitlint==0.8.2
# Needed for visualising cprofile reports
snakeviz==0.4.2
# Needed to sync translations from transifex
transifex-client==0.12.4

View File

@@ -129,6 +129,7 @@ simplegeneric==0.8.1 # via ipython
simplejson==3.11.1
six==1.10.0
smmap==0.9.0
snakeviz==0.4.2
snowballstemmer==1.2.1
social-auth-app-django==1.2.0
social-auth-core==1.4.0 # via social-auth-app-django

View File

@@ -401,6 +401,9 @@ if __name__ == "__main__":
prof.dump_stats("/tmp/profile.data")
print("Profile data saved to /tmp/profile.data")
print("You can visualize it using e.g. `snakeviz /tmp/profile.data`")
print("Note: If you are using vagrant for development environment you will need to do:")
print("1.) `vagrant ssh -- -L 8080:127.0.0.1:8080`")
print("2.) `snakeviz -s /tmp/profile.data`")
if options.report_slow_tests:
from zerver.lib.test_runner import report_slow_tests