_lsprof
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_lsprof.so
Module Docs

Fast profiler

 
Classes
       
__builtin__.object
Profiler
profiler_entry
profiler_subentry

 
class Profiler(__builtin__.object)
    Profiler(custom_timer=None, time_unit=None, subcalls=True, builtins=True)
 
Builds a profiler object using the specified timer function.
The default timer is a fast built-in one based on real time.
For custom timer functions returning integers, time_unit can
be a float specifying a scale (i.e. how long each integer unit
is, in seconds).
 
  Methods defined here:
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
clear(...)
clear()
 
Clear all profiling information collected so far.
disable(...)
disable()
 
Stop collecting profiling information.
enable(...)
enable(subcalls=True, builtins=True)
 
Start collecting profiling information.
If 'subcalls' is True, also records for each function
statistics separated according to its current caller.
If 'builtins' is True, records the time spent in
built-in functions separately from their caller.
getstats(...)
getstats() -> list of profiler_entry objects
 
Return all information collected by the profiler.
Each profiler_entry is a tuple-like object with the
following attributes:
 
    code          code object
    callcount     how many times this was called
    reccallcount  how many times called recursively
    totaltime     total time in this entry
    inlinetime    inline time in this entry (not in subcalls)
    calls         details of the calls
 
The calls attribute is either None or a list of
profiler_subentry objects:
 
    code          called code object
    callcount     how many times this is called
    reccallcount  how many times this is called recursively
    totaltime     total time spent in this call
    inlinetime    inline time (not in further subcalls)

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

 
class profiler_entry(__builtin__.object)
     Methods defined here:
__add__(...)
x.__add__(y) <==> x+y
__contains__(...)
x.__contains__(y) <==> y in x
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__rmul__(...)
x.__rmul__(n) <==> n*x

Data descriptors defined here:
callcount
how many times this was called
calls
details of the calls
code
code object or built-in function name
inlinetime
inline time in this entry (not in subcalls)
reccallcount
how many times called recursively
totaltime
total time in this entry

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
n_fields = 6
n_sequence_fields = 6
n_unnamed_fields = 0

 
class profiler_subentry(__builtin__.object)
     Methods defined here:
__add__(...)
x.__add__(y) <==> x+y
__contains__(...)
x.__contains__(y) <==> y in x
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__rmul__(...)
x.__rmul__(n) <==> n*x

Data descriptors defined here:
callcount
how many times this is called
code
called code object or built-in function name
inlinetime
inline time (not in further subcalls)
reccallcount
how many times this is called recursively
totaltime
total time spent in this call

Data and other attributes defined here:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
n_fields = 5
n_sequence_fields = 5
n_unnamed_fields = 0