pprofile3(1)

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

Section 1 python3-pprofile bookworm source

Description

PPROFILE3

NAME

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

SYNOPSIS

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

DESCRIPTION

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.

OPTIONS

-h, --help

Show summary of options.

-m MODULE

Searches sys.path for the named module and runs the corresponding .py file as a
script. When given, positional argumentsbecome sys.argv[1:].

-o, --out OUT

Write annotated sources to this file. Defaults to stdout.

-z, --zipfile ZIPFILE

Name of a zip file to generate from all involved source files. Useful with
callgrind output.

-t, --threads THREADS

If non-zero, trace threads spawned by program. Default: 1.

-f, --format callgrind,text

Format in which output is generated. If not set, auto-detected from filename if provided, falling back to "text".

-v, --verbose

Enable profiler internal tracing output. Cryptic and verbose.

-s, --statistic STATISTIC

Use this period for statistic profiling, or use deterministic profiling when 0.

AUTHOR

pprofile was written by Vincent Pelletier <plr.vincent@gmail.com>

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