Python CProfile Module
Performance profiler — run, runctx, Profile, enable, disable, dump_stats. This category documents 4 Python cprofile module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: cProfile.run(), cProfile.runctx(), cProfile.Profile.enable(), cProfile.Profile.dump_stats(). cProfile.run() runs a Python statement under the profiler and prints statistics. cProfile.runctx() runs a command with explicit globals/locals under the profiler. cProfile.Profile.enable() starts collecting profiling data. cProfile.Profile.dump_stats() writes profiling data to a file (can be analyzed with pstats). CProfile Module belongs to the Dev Tools group alongside Inspect Module, Pdb Module, Traceback Module, Timeit Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground. Python Reference documents 978+ functions, methods, and modules across 114 categories of the standard library, and every entry in this CProfile Module category follows the same format — syntax first, then what it does, the parameters it accepts, what it returns, and a working code example — so once you have read one page you can read them all.