Chapter 7. Profiling and Debugging

In this chapter, we will cover:

  • Profiling with timeit
  • Profiling with IPython
  • Installing line_profiler
  • Profiling code with line_profiler
  • Profiling code with the cProfile extension
  • Debugging with IPython
  • Debugging with pudb

Introduction

Debugging is the act of finding and removing bugs in software. Profiling is about building a profile of a software program in order to collect information about memory usage or time complexity. Profiling and debugging are activities that are an integral part of the life of a developer. This is especially true for non-trivial software. The good news is that there are lots of tools to help you. We will review a number of techniques that are popular amongst NumPy users.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset