ASPN ActiveState Programmer Network
  ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups | Web Services
SEARCH

Reference
ActivePython 2.5
Python Documentation
Library Reference
25. The Python Profilers
25.1 Introduction to the profilers
25.2 Instant User's Manual
25.3 What Is Deterministic Profiling?
25.4 Reference Manual - profile and cProfile
25.5 Limitations
25.6 Calibration
25.7 Extensions -- Deriving Better Profilers
25.8 hotshot -- High performance logging profiler
25.8.1 Profile Objects
25.8.2 Using hotshot data
25.8.3 Example Usage
25.9 timeit -- Measure execution time of small code snippets
25.10 trace -- Trace or track Python statement execution

MyASPN >> Reference >> ActivePython 2.5 >> Python Documentation >> Library Reference >> 25. The Python Profilers
ActivePython 2.5 documentation

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.

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState 2004 All rights reserved