"""
This script processes data recorded by profiler and creates two types
of diagrams - UML sequence diagrams and call graphs.
Requirements for custom Python installations
============================================
Python, which is bundled with winIDEA, already has all dependencies
configured.
1. - For sequence diagrams module 'seqdiag' has to be installed.
First download setuptools from:
https://pypi.python.org/pypi/setuptools#files
and install.
- Install 'seqdiag' (use correct path for your Python installation):
pip install seqdiag
Alternatively (if the above steps failed) you can download seqdiag from:
https://pypi.python.org/pypi/seqdiag/
Uncompress it (7-zip can be used) and run:
python setup.py
2. Install graphviz. Windows installer can be downloaded from:
http://www.graphviz.org/Download_windows.php
The console or IDE where the scripts will be ran should be restarted
after the graphviz has been installed.
See also help text in function _parse_cmd_line_options().
"""
import sys
import traceback
import isystem.seqAndCallDiag as scdiag
def main():
profilerExportFile = '../../targetProjects/profilerSample-1.xml'
callGraphImageFName = '../../targetProjects/profilerSample-1.call'
seqDiagImageFName = '../../targetProjects/profilerSample-1.svg'
functionName = ''
isCreateSeqDiag = True
isCreateCallGraph = False
seqDiagCompactLevel = 4
isCreateSeqDiagImage = True
isCreateCallGraphImage = False
isOpenSeqDiagImage = True
isOpenCallGraphImage = False
variableName = ''
is_binary_timeline = False
try:
scdiag.generateDiagrams('',
profilerExportFile,
callGraphImageFName,
seqDiagImageFName,
'',
isCreateSeqDiag, isCreateCallGraph,
4,
isCreateSeqDiagImage, isCreateCallGraphImage,
isOpenSeqDiagImage, isOpenCallGraphImage,
variableName, is_binary_timeline)
except Exception as ex:
print(str(ex), file=sys.stderr)
traceback.print_exc()
if __name__ == "__main__":
main()