-
Notifications
You must be signed in to change notification settings - Fork 0
callGraphsUMLdiagrams
Marcel Schmalzl edited this page Sep 16, 2024
·
3 revisions
sudo apt-get install graphviz
pip3 install gprof2dot
Generate data using python3
python3 -m cProfile -o test.profile ./MAdZ.py
# ^^^^^^^ ^^^^^
# output file input file (to be analysed)
Generate a .dot
file from profiled data:
gprof2dot -f pstats test.profile -o callingGrpah.dot
Generate a .png
with 300 dpi resolution (default = 96dpi) from our .dot
-file using graphviz:
dot -Tpng -Gdpi=300 callingGrpah.dot > callingGrpah.png
We also want a .svg
:
dot -Tsvg callingGrpah.dot > callingGrpah.svg
pip3 install pylint # pyreverse is part of the pylint package
sudo apt install graphviz # Needed for visualisation
pyreverse -ASmy -o png ./MAdZ.py -p MAdZ
# ^^^^^ ^^^^^^ ^^^^
# output format ||| output filename ("classes" will be prepended)
# file to analyse
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License *.
Code (snippets) are licensed under a MIT License *.
* Unless stated otherwise