diff options
author | nicolargo <nicolas@nicolargo.com> | 2018-11-25 10:04:28 +0100 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2018-11-25 10:04:28 +0100 |
commit | 27230bfb5ce9d8bae0a52b2029ed1e6248ee10d7 (patch) | |
tree | b3ad89c4499082228095215b1b12c8645d0d466f /docs/dev | |
parent | dda9dd3b8fe00ade32da675a0cb72a6f8ed7e26a (diff) |
Add CPU profiling page
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/README.txt | 17 | ||||
-rw-r--r-- | docs/dev/glances-cprofile.png | bin | 0 -> 325975 bytes |
2 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 diff --git a/docs/dev/glances-cprofile.png b/docs/dev/glances-cprofile.png Binary files differnew file mode 100644 index 00000000..866cbf4b --- /dev/null +++ b/docs/dev/glances-cprofile.png |