Profiling Python Programs
For RHEL6 and newer distributions tools are available to profile Python code and to generate dynamic call graphs of a program's execution. Flat profiles can be obtained with the cProfile module and dynamic callgraphs can be obtained with pycallgraph. The cProfile Python module records information about each of the python methods run. For older versions of Python that do not include the cProfile module you can use the higher overhead profile module. Profiling is fairly simple with the cProfile module...