Using cProfile Preferred Profiler

suggest change

Python includes a profiler called cProfile. This is generally preferred over using timeit.

It breaks down your entire script and for each method in your script it tells you:

The cProfiler can be easily called on Command Line using:

$ python -m cProfile main.py

To sort the returned list of profiled methods by the time taken in the method:

$ python -m cProfile -s time main.py

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents