PPROFILE3(1)

πŸ’– PPROFILE3 πŸ’–

okay bestie, so this is the manual page for the pprofile3 command, from the General Commands Manual section of the manual (section 1, iykyk) 🫢


✨ NAME ✨

pprofile β€” Line-granularity, thread-aware deterministic and statistic pure-python profiler 🌸

like. it profiles ur python. line by line. it's giving main character energy for your slow code πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

that's it, that's the whole vibe. module in, profile out ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

This manual page documents briefly the pprofile3 command. πŸ’–

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

okay so let's break it down because this thing is lowkey iconic:

  • Line granularity β€” it lets you locate precisely where time is spent in code. not "somewhere in this function", like, that exact line, bestie πŸ”
  • Thread awareness β€” profiling automatically propagates to all threads. and that means all threads in statistic mode, or threads spawned by profiled code in deterministic mode. she multi-tasks fr fr 🧡✨
  • Deterministic profiling β€” gives precise measures, but at a large speed cost (best used on minimal test scenario). so like, careful, she's thorough but she's slow 😭
  • Statistic profiling β€” gives rough measure, but has an extremely low overhead (suitable for live code profiling). she's fast and unbothered 🌈

and the best part: it does not require marking methods to profile, allowing non-method profiling β€” module imports, class & function declarations and other module-level code. you literally don't have to touch ur code, she just knows πŸ‘‘

also she can produce callgrind output. slay πŸŽ€


πŸ’… OPTIONS πŸ’…

  • -h, --help β€” Show summary of options. the classic. the legend. ur girl will tell you what she does πŸ’–
  • -m MODULE β€” Searches sys.path for the named module and runs the corresponding .py file as a script. When given, positional arguments become sys.argv[1:]. so like, she'll go hunt down ur module in sys.path herself πŸ•΅οΈβ™€οΈ
  • -o, --out OUT β€” Write annotated sources to this file. Defaults to stdout. wanna keep the receipts? put em in a file, otherwise she's yelling into the terminal πŸ“
  • -z, --zipfile ZIPFILE β€” Name of a zip file to generate from all involved source files. Useful with callgrind output. zip zip hooray πŸ—œοΈβœ¨
  • -t, --threads THREADS β€” If non-zero, trace threads spawned by program. Default: 1. she's thread-aware by default, periodt 🧡
  • -f, --format callgrind,text β€” Format in which output is generated. If not set, auto-detected from filename if provided, falling back to "text". she's smart, she'll figure it out πŸ§ πŸ’…
  • -v, --verbose β€” Enable profiler internal tracing output. Cryptic and verbose. ngl bestie this one is a lot. it's giving "reading the matrix" πŸ’€ use with caution
  • -s, --statistic STATISTIC β€” Use this period for statistic profiling, or use deterministic profiling when 0. so like, 0 = precise but slow, anything else = rough but fast ⚑

πŸ‘‘ 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). 🫢


✨ so yeah. go profile something. ur code deserves the glow-up. πŸ¦‹

pprofile3(1) Β· dated Oct 23, 2016 Β· mwah, bye bestie πŸ’‹πŸ’–