Let’s Build a Python Profiler in 25 LOC


Follow to receive video recommendations   a   A

A profile is a set of statistics that describes how often and for how long various parts of the program executed. Most profilers run inside your Python process. If you’re inside a Python program you generally have pretty easy access to its stack, hence we can gather information about time spent in each level.

In this talk we’ll build a Python profiler from scratch and so learn about the dynamic nature of Python and how do well-known profilers such as cProfile.

We’ll also learn the difference between a tracing and a sampling profiler and which one to use in what circumstance.

Editors Note:

I would like to work with open source projects to create a branch of the tree with all of the best videos for your open source project. Please send me an email if you are interested.