The Python Profilers

The Python Profilers

Source code: Lib/profile.py and Lib/pstats.py

1. Introduction to the profilers

cProfile and profile provide deterministic profiling of Python programs. A profile is a set of statistics that describes how often and for how long various parts of the program executed. These statistics can be formatted into reports via t