Scroll to navigation

PPROFILE3(1) General Commands Manual PPROFILE3(1)


pprofile - Line-granularity, thread-aware deterministic and statistic pure-python profiler


pprofile3 [options] some-python-module [arguments]


This manual page documents briefly the pprofile3 command.

pprofile is a Line-granularity, thread-aware deterministic and statistic pure-python profiler

Line-granularity, thread-aware deterministic and statistic pure-python profiler. Line granularity allows locating precisely where time is spent in code. Thread awareness automatically propagates profiling to all threads (all threads in statistic mode, or threads spawned by profiled code in deterministic mode). Deterministic profiling gives precise measures, but at a large speed cost (best used on minimal test scenario). Statistic profiling gives rough measure, but has an extremely low overhead (suitable for live code profiling). Does not require marking methods to profile, allowing non-method profiling (module imports, class & function declarations and other module-level code). Can produce callgrind output.


Show summary of options.

Searches sys.path for the named module and runs the corresponding .py file as a
script. When given, positional argumentsbecome sys.argv[1:].
Write annotated sources to this file. Defaults to stdout.
Name of a zip file to generate from all involved source files. Useful with
callgrind output.
If non-zero, trace threads spawned by program. Default: 1.
Format in which output is generated. If not set, auto-detected from filename if provided, falling back to "text".
Enable profiler internal tracing output. Cryptic and verbose.
Use this period for statistic profiling, or use deterministic profiling when 0.


pprofile was written by Vincent Pelletier <>

This manual page was written by Josue Ortega <> for the Debian project (and may be used by others).

October 23, 2016