Skip to Content
Tkinter GUI Application Development Blueprints, Second Edition - Second Edition
book

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

by Bhaskar Chaudhary
March 2018
Beginner to intermediate
422 pages
10h 33m
English
Packt Publishing
Content preview from Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Profiling your program

Profiling involves generating detailed statistics to show how often and for how long various routines of a program execute. This helps you isolate the offending parts of a program, and those parts probably need redesigning.

Python provides a built-in module named cProfile, which enables the generation of detailed statistics pertaining to a program. The module gives details such as the total program running time, the time taken to run each function, and the number of times each function is called. These statistics make it easy to determine the parts of the code that need optimization.

In particular, cProfile provides the following data for a function or script:

  • ncalls: This indicates the number of times a function is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints

Tkinter GUI Application Development Blueprints

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788837460Supplemental Content