19 Dec 2019

Python profiling

History / Edit / PDF / EPUB / BIB / 1 min read (~117 words)

Run your program with python -m cProfile -o profile.cprofile my-script.py

Install pyprof2calltree to convert the cprofile to a kcachegrind compatible profile.

pyprof2calltree -i profile.cprofile -o callgrind.profile.cprofile