[Tutor] Timing a python program

CL Talk cltalk at gmail.com
Fri Jan 16 06:02:27 CET 2015


Hello - I have a python program that reads data from data files and
does manipulation on the data and writes back to output files. I am
developing this program on a macbook with python 2.7.6.

This program takes close to 10 minutes on my machine to run. But, the
issue is that it is not take the same amount of time on almost similar
data files.

I am trying to see how I can time the whole program as well as various
functions that are part of the program.

Say, that I have 5 functions in this program how can i time the whole
program and time each individual function for every run?

Thanks in advance for your help and ideas.


More information about the Tutor mailing list