AlkantarClanX12

Your IP : 3.16.135.226


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/cProfile.cpython-37.opt-1.pyc

B

� fm�@szdZdddgZddlZddlZddd�Zddd�Zejje_ejje_Gd	d�dej�Zd
d�Z	dd
�Z
edkrve
�dS)zUPython interface for the 'lsprof' profiler.
   Compatible with the 'profile' module.
�run�runctx�Profile�N���cCst�t��|||�S)N)�
_pyprofile�_Utilsrr)�	statement�filename�sort�r�-/opt/alt/python37/lib64/python3.7/cProfile.pyrscCst�t��|||||�S)N)rrrr)r�globals�localsr	r
rrrrsc@sJeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)ra`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).
    rcCs$ddl}|�|����|���dS)Nr)�pstats�StatsZ
strip_dirsZ
sort_stats�print_stats)�selfr
rrrrr(szProfile.print_statsc	Cs8ddl}t|d��}|��|�|j|�WdQRXdS)Nr�wb)�marshal�open�create_stats�dump�stats)r�filer�frrr�
dump_stats,szProfile.dump_statscCs|��|��dS)N)�disable�snapshot_stats)rrrrr2szProfile.create_statsc
Cs6|��}i|_i}xX|D]P}t|j�}|j}||j}|j}|j}i}	|	|t|j�<|||||	f|j|<qWx�|D]�}|j	rrt|j�}x�|j	D]�}
y|t|
j�}	Wnt
k
r�w�YnX|
j}||
j}|
j}|
j}||	k�r|	|}||d7}||d7}||d7}||d7}||||f|	|<q�WqrWdS)Nr���)Zgetstatsr�label�codeZ	callcountZreccallcountZ
inlinetimeZ	totaltime�idZcalls�KeyError)r�entriesZcallersdicts�entry�funcZncZccZttZctZcallersZsubentry�prevrrrr6s>






zProfile.snapshot_statscCsddl}|j}|�|||�S)Nr)�__main__�__dict__r)r�cmdr)�dictrrrr\szProfile.runcCs(|��zt|||�Wd|��X|S)N)�enable�execr)rr+r
rrrrras

zProfile.runctxcOsxt|�dkr|^}}}n>|s&td��n0d|krB|�d�}|^}}ntdt|�d��|��z
|||�S|��XdS)Nrz:descriptor 'runcall' of 'Profile' object needs an argumentr'z7runcall expected at least 1 positional argument, got %dr)�len�	TypeError�popr-r)�args�kwrr'rrr�runcalljs



zProfile.runcallN)r)�__name__�
__module__�__qualname__�__doc__rrrrrrr4rrrrrs
&	cCs(t|t�rdd|fS|j|j|jfSdS)N�~r)�
isinstance�str�co_filename�co_firstlineno�co_name)r"rrrr!s

r!c
	Cs^ddl}ddl}ddl}ddl}ddlm}d}||d�}d|_|jdddd	dd
�|jddd
ddt|j	j
�d�|jdddddd�|jdd�s�|��|�
d�|��\}}||jdd�<t|�dk�rR|jr�d}	|j|dd�}
nR|d}|j�d|j�|��t|d��}t|��|d�}	WdQRX|dddd�}
t|	|
d|j|j�n|��|S)Nr)�OptionParserzNcProfile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...)�usageFz-oz	--outfile�outfilezSave stats to <outfile>)�dest�help�defaultz-sz--sortr
z?Sort order when printing to stdout, based on pstats.Stats classr)rBrCrD�choicesz-m�module�
store_truezProfile a library module)rB�actionrCrDrrz(run_module(modname, run_name='__main__'))�
run_module�modname�rbr.r))�__file__r5�__package__�
__cached__)�os�sys�runpyrZoptparser?Zallow_interspersed_argsZ
add_option�sortedrZsort_arg_dict_default�argvZprint_usage�exit�
parse_argsr/rFrI�path�insert�dirnamer�compile�readrrAr
)
rOrPrQrr?r@�parserZoptionsr2r"ZglobsZprogname�fprrr�main�sJ






r]r))Nr)Nr)r8�__all__Z_lsprofZprofilerrrZProfilerrr!r]r5rrrr�<module>s




d1