summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-11 09:20:34 +0000
committerJürg Billeter <j@bitron.ch>2019-02-11 09:20:34 +0000
commitbb6a692de806dbceeba6eda95a3987cf2da576c1 (patch)
treecc3a3e9e6e07a4d6a8451035013245dae765c30c
parentc07cc967debeaa0bf3dfc46cbcd98a416e2f5370 (diff)
parent9e3d3e0532444c46a907128560cdad31888dcdea (diff)
downloadbuildstream-bb6a692de806dbceeba6eda95a3987cf2da576c1.tar.gz
Merge branch 'snakeviz' into 'master'
contributing: snakeviz replaces pyflame+flamegraph See merge request BuildStream/buildstream!1129
-rw-r--r--CONTRIBUTING.rst23
1 files changed, 5 insertions, 18 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 815acfca6..b993b08b6 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1707,26 +1707,13 @@ You can then analyze the results interactively using the 'pstats' module:
For more detailed documentation of cProfile and 'pstats', see:
https://docs.python.org/3/library/profile.html.
-For a richer visualisation of the callstack you can try `Pyflame
-<https://github.com/uber/pyflame>`_. Once you have followed the instructions in
-Pyflame's README to install the tool, you can profile `bst` commands as in the
-following example:
+For a richer and interactive visualisation of the `.cprofile` files, you can
+try `snakeviz <http://jiffyclub.github.io/snakeviz/#interpreting-results>`_.
+You can install it with `pip install snakeviz`. Here is an example invocation:
- pyflame --output bst.flame --trace bst --help
-
-You may see an `Unexpected ptrace(2) exception:` error. Note that the `bst`
-operation will continue running in the background in this case, you will need
-to wait for it to complete or kill it. Once this is done, rerun the above
-command which appears to fix the issue.
-
-Once you have output from pyflame, you can use the ``flamegraph.pl`` script
-from the `Flamegraph project <https://github.com/brendangregg/FlameGraph>`_
-to generate an .svg image:
-
- ./flamegraph.pl bst.flame > bst-flamegraph.svg
-
-The generated SVG file can then be viewed in your preferred web browser.
+ snakeviz bst.cprofile
+It will then start a webserver and launch a browser to the relevant page.
Profiling specific parts of BuildStream with BST_PROFILE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~