File: //usr/lib/python3.5/__pycache__/profile.cpython-35.pyc
FaV @ s d Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d d g Z Gd d d Z d d d
d Z d d d d Z
Gd d d Z d
d Z e
d k r e d S)z Class for profiling Python code. N)OptionParserrunrunctxProfilec @ sF e Z d Z d Z d d Z d d Z d d Z d d Z d
S)_UtilszSupport class for utility functions which are shared by
profile.py and cProfile.py modules.
Not supposed to be used directly.
c C s
| | _ d S)N)profiler)selfr r /usr/lib/python3.5/profile.py__init__1 s z_Utils.__init__c C sQ | j } z* y | j | Wn t k
r4 Yn XWd | j | | | Xd S)N)r r
SystemExit_show)r statementfilenamesortprofr r r
r 4 s
z
_Utils.runc C sW | j } z0 y | j | | | Wn t k
r: Yn XWd | j | | | Xd S)N)r r r r
)r r globalslocalsr r r r r r
r = s
z
_Utils.runctxc C s- | d k r | j | n
| j | d S)N)
dump_statsprint_stats)r r r r r r r
r
F s z_Utils._showN)__name__
__module____qualname____doc__r r r r
r r r r
r + s
r c C s t t j | | | S)a Run statement under profiler optionally saving results in filename
This function takes a single argument that can be passed to the
"exec" statement, and an optional file name. In all cases this
routine attempts to "exec" its first argument and gather profiling
statistics from the execution. If no file name is present, then this
function automatically prints a simple profiling report, sorted by the
standard name string (file/line/function-name) that is presented in
each line.
)r r r )r r r r r r
r R s c C s t t j | | | | | S)zRun statement under profiler, supplying your own globals and locals,
optionally saving results in filename.
statement and filename have the same semantics as profile.run
)r r r )r r r r r r r r
r _ s c @ st e Z d Z d Z d Z d d d d Z d d Z d d Z d
d Z d d
Z d d Z
d d Z d d Z d d Z
d e d e
d e
d e d e
d e
i Z d d Z Gd d d Z Gd d! d! Z d"