pprofile2

Line-granularity, deterministic and statistic Python profiler

Install

All systems
curl cmd.cat/pprofile2.sh
Debian Debian
apt-get install python-pprofile
Ubuntu
apt-get install python-pprofile
image/svg+xml Kali Linux
apt-get install python-pprofile
Windows (WSL2)
sudo apt-get update sudo apt-get install python-pprofile
Raspbian
apt-get install python-pprofile

python-pprofile

Line-granularity, deterministic and statistic 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). This package installs the library for Python 2.