We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Let’s Build a Python Profiler in 25 LOC

Formal Metadata

Title
Let’s Build a Python Profiler in 25 LOC
Title of Series
Number of Parts
132
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
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.