February 2006
Intermediate to advanced
648 pages
14h 53m
English
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:
p.addinfo(key,value)
Adds a labeled value to the profile output.
p.close()
Closes the profiler.
p.fileno()
Returns the file number ...
Read now
Unlock full access