Built-in Tools
4 entriesIncluded with Python.
CPU & Sampling Profilers
6 entriesFind where time is spent.
Memory Profilers
2 entriesFind where memory goes.
Tracing & Visualization
3 entriesTimelines, flame graphs and viewers.
Related Pages
5 entriesNeighbouring pages on this site.
Frequently Asked Questions
How do I profile Python code?
Start with cProfile or a sampling profiler such as py-spy or Pyinstrument to find hot functions, then use line_profiler for detail and memray or tracemalloc for memory.
What is the difference between deterministic and sampling profilers?
Deterministic profilers such as cProfile record every call and add overhead, while sampling profilers such as py-spy check the stack periodically and are cheaper for production use.
Is memory_profiler still maintained?
Its last GitHub update was in April 2024, so consider memray or tracemalloc for new work.
How current is this page?
Links were checked in October 2026. Sites that block automated checks are kept and may need a manual click. Last-commit dates are from GitHub in October 2026 and show activity only; check each project's release notes before adopting it.