Python

Embed
Preview of the card
<a href="https://watchtowerops.net/docs/profilers-python"><img src="https://watchtowerops.net/docs/_api/public/orgs/aa5959cb-1a0b-4a9a-bc9a-913e7ac31cd9/spaces/b7aac181-9916-4805-b253-becc5fd2ca62/pages/cdc42c3a-0ce9-4422-9ad0-72bfc1f437a7/social-card.svg?v=3e7ae33eec8b" alt="Python" width="600" height="315"></a>

External profiler: py-spy (MIT). Sample types: cpu (default). Span links: no. Needs no code change, but needs ptrace permission on the target process. Memory profiles are not supported.

py-spy record -f raw -d 60 -o cpu.raw --pid <pid>
wtctl profile upload cpu.raw --service checkout --version 1.4.2 --format folded

-f raw is the collapsed stack format. Fixture: fixtures/py-spy.raw.

Updated