I want to know how to profile my code.
I have gone through the docs, but as there were no examples given I could not get anything from it.
I have a large cod
Use cProfile. You can use it from the command line and pass in your module as a parameter, so you don't need a main method.
main