How to measure execution time of a program

Wolfram Kraus kraus at hagen-partner.de
Wed Jun 28 11:14:13 CEST 2006


On 28.06.2006 10:01, Girish Sahani wrote:
> Sorry for spamming again, but please also enlighten me with some way to
> time a function i.e. to find out how much time each function takes for
> execution in a big program.
>> Hi all,
>>
>>   Can anyone tell me the simplest way to do it (some code snippet that
>> could be included in the program's main function) ??
>>
>> Thanks,
>> girish
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
> 

Use the Python profiler:

http://docs.python.org/lib/profile.html

HTH,
Wolfram



More information about the Python-list mailing list