The hotshot module provides high-performance profiling information. Because the module is written primarily in C, it should be much faster than the profile module.
Profile(filename [, lineevents [, linetimings]])
Creates a Profile object. filename is the name of a file to which profile data will be logged. lineevents is a Boolean flag that indicates whether to log each line of source code or just function calls. The default value is False. linetimings is a Boolean flag that indicates whether or not to record timing information. The default value is True.
An instance, p, of Profile has the following methods:
Adds a labeled value to the profile output.
Closes the profiler.
Returns the file number ...