25.8 hotshot -- High performance logging profiler

New in version 2.2.

This module provides a nicer interface to the _hotshot C module. Hotshot is a replacement for the existing profile module. As it's written mostly in C, it should result in a much smaller performance impact than the existing profile module.

Note: The hotshot module focuses on minimizing the overhead while profiling, at the expense of long data post-processing times. For common usages it is recommended to use cProfile instead. hotshot is not maintained and might be removed from the standard library in the future.

Changed in version 2.5: the results should be more meaningful than in the past: the timing core contained a critical bug.

Warning: The hotshot profiler does not yet work well with threads. It is useful to use an unthreaded script to run the profiler over the code you're interested in measuring if at all possible.

class Profile( logfile[, lineevents[, linetimings]])
The profiler object. The argument logfile is the name of a log file to use for logged profile data. The argument lineevents specifies whether to generate events for every source line, or just on function call/return. It defaults to 0 (only log function call/return). The argument linetimings specifies whether to record timing information. It defaults to 1 (store timing information).

See About this document... for information on suggesting changes.