diff options
Diffstat (limited to 'docs/dev/README.txt')
-rw-r--r-- | docs/dev/README.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/dev/README.txt b/docs/dev/README.txt new file mode 100644 index 00000000..c13231ef --- /dev/null +++ b/docs/dev/README.txt @@ -0,0 +1,17 @@ +Glances profiling +================= + +First install Sphinx and the RTD theme: + + apt install graphviz + pip install gprof2dot + +Then generate the profiling diagram: + + cd <Glances source> + python -m cProfile -o /tmp/glances.pstats ./glances/__main__.py + gprof2dot -f pstats /tmp/glances.pstats | dot -Tpng -o /tmp/glances-cprofile.png + +Example: + +.. image:: https://raw.githubusercontent.com/nicolargo/glances/develop/docs/dev/glances-cprofile.png |