Examples for Python Profiling Starter Kit presentation, given at Montréal-Python on March 22nd, 2021.
The profilers covered were Pyinstrument, Scalene, Py-Spy, and VizTracer.
The Makefile
shows an example or two for how to run each of these profilers.
We assume you already have a recent version of Python (say, 3.9) and Pipenv installed. Then, in a command-line, run:
pipenv install
— to install all the toolsmake pyinstrument
— for example, to run Pyinstrument on the sampleslow_program.py
and output its report.
Link to the slides and more at http://christianhudon.name/talks/#mp-python-profiling.