Skip to content
Runtime utilitiesPython Tooling

python -m cProfile

Profile Python applications to analyze performance bottlenecks.

Command
python -m cProfile -o profile.out .py

Example usage

Generate deterministic profiling data for later inspection.

python -m cProfile -o profile.out <script>.py

Related tags

Runtime utilitiespythonvenvpip