Skip to content

Python Profiler Overview 🐍

Published 2023-05-25; Updated 2024-12-01

The following table gives an overview across many popular and actively maintained Python profilers and their capabilities:

Profiler Time Mem Viz Type Other
cProfile - - instrumenting Viz via SnakeViz or Tuna
py-spy - sampling
memray - instrumenting
Scalene sampling also GPU time
Austin sampling can also be used with pprof
pyinstrument - sampling
Linux perf - - sampling needs Python 3.12+
line_profiler - - instrumenting
Fil - instrumenting
Guppy3 - - instrumenting
Yappi - - instrumenting
Palanteer instrumenting also supports C++
vprof sampling
VizTracer - instrumenting
gprofiler - sampling supports also native & Java programs and kernel routines
OTel eBPF Profiler - sampling local viz via devfiler, integration with OTel
pyroscope-io - sampling client for pyroscope platform
sciagraph sampling proprietary
akarsu - - - instrumenting counts events via sys.monitoring, needs Python 3.12+

Others

Post Updates

2024-12-01: Added Linux perf, OTel eBPF Profiler, akarsu, gprofiler and bcc pyperf

2024-12-01: Updated Pyroscope details, adding link to their eBPF profiler