Current File : //opt/RZpython2/lib/python2.7/profile.pyo |
�
��#ec @ 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 d g Z e d d � Z e d d � Z
d
� Z e e d � r� e j
d � Z n d
Z y+ d d l Z d � Z e d � Z d Z Wn e k
r� n Xd f d � � YZ d � Z d � Z e d k r e � n d S( s Class for profiling Python code.i����N( t OptionParsert runt runctxt helpt Profilec C s] t � } y | j | � } Wn t k
r/ n X| d k rL | j | � n
| j | � Sd S( s 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.
N( R R t
SystemExitt Nonet
dump_statst print_stats( t statementt filenamet sortt prof( ( s'