Write your own timer decorators and context managers, time.perf_counter, timeit.Timer and caveats

Published: 01 August 2019
on channel: Live Python
2,584
47

Learn how to write your own timers with decorators for measuring how long a function takes to run.

We'll meet using context managers to write our own timers for arbitrarily long blocks of code.

Then we'll meet the timeit builtin module and how to use it in your programs and running it from the command line as well.

A great thing to have up your sleeve for the times that you need it.


Watch video Write your own timer decorators and context managers, time.perf_counter, timeit.Timer and caveats online without registration, duration hours minute second in high quality. This video was added by user Live Python 01 August 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,584 once and liked it 47 people.