From 28bedf8017e81e54758084b235ced017a217e388 Mon Sep 17 00:00:00 2001 From: James Ennis Date: Tue, 19 Jun 2018 10:47:36 +0000 Subject: HACKING.rst: Double colon for commands --- HACKING.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HACKING.rst b/HACKING.rst index dd791bd24..e201f47d7 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -509,11 +509,11 @@ tool. Python provides `cProfile `_ which gives you a list of all functions called during execution and how much time was spent in each function. Here is an example of running `bst --help` -under cProfile: +under cProfile:: python3 -m cProfile -o bst.cprofile -- $(which bst) --help -You can then analyze the results interactively using the 'pstats' module: +You can then analyze the results interactively using the 'pstats' module:: python3 -m pstats ./bst.cprofile @@ -523,7 +523,7 @@ https://docs.python.org/3/library/profile.html. For a richer visualisation of the callstack you can try `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: +following example:: pyflame --output bst.flame --trace bst --help @@ -534,7 +534,7 @@ command which appears to fix the issue. Once you have output from pyflame, you can use the ``flamegraph.pl`` script from the `Flamegraph project `_ -to generate an .svg image: +to generate an .svg image:: ./flamegraph.pl bst.flame > bst-flamegraph.svg -- cgit v1.2.1