Follow one of the below links for further information and examples
profile
Class for profiling Python code.