File: //lib64/python3.6/__pycache__/cProfile.cpython-36.pyc
3
\ @ sz d Z dddgZddlZddlZdddZdddZejj e_ ejj e_ G d d dejZd
d Z dd
Z
edkrve
dS )zUPython interface for the 'lsprof' profiler.
Compatible with the 'profile' module.
runrunctxProfile N c C s t jtj| ||S )N)
_pyprofile_Utilsr r ) statementfilenamesort r /usr/lib64/python3.6/cProfile.pyr s c C s t jtj| ||||S )N)r r r r )r globalslocalsr r
r r r r s c @ sJ e Zd ZdZdddZdd Zdd Zd d
Zdd Zd
d Z dd Z
dS )r a` Profile(timer=None, timeunit=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, timeunit can
be a float specifying a scale (i.e. how long each integer unit
is, in seconds).
r c C s$ dd l }|j| j j|j d S )Nr )pstatsStatsZ
strip_dirsZ
sort_statsprint_stats)selfr
r r r r r ( s zProfile.print_statsc
C s8 dd l }t|d}| j |j| j| W d Q R X d S )Nr wb)marshalopencreate_statsdumpstats)r filer fr r r
dump_stats, s zProfile.dump_statsc C s | j | j d S )N)disablesnapshot_stats)r r r r r 2 s zProfile.create_statsc C s6 | j }i | _i }xX|D ]P}t|j}|j}||j }|j}|j}i } | |t|j<