ok

Mini Shell

Direktori : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/cProfile.cpython-36.opt-2.pyc

3

��2a��@svdddgZddlZddlZddd�Zddd�Zejje_ejje_Gdd�dej�Zd	d
�Z	dd�Z
ed
krre
�dS)�run�runctx�Profile�N�cCstjt�j|||�S)N)�
_pyprofile�_Utilsrr)�	statement�filename�sort�r�-/opt/alt/python36/lib64/python3.6/cProfile.pyrscCstjt�j|||||�S)N)rrrr)r�globals�localsr	r
rrrrsc@sFeZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dS)rrcCs$ddl}|j|�j�j|�j�dS)Nr)�pstats�StatsZ
strip_dirsZ
sort_stats�print_stats)�selfr
rrrrr(szProfile.print_statsc
Cs8ddl}t|d��}|j�|j|j|�WdQRXdS)Nr�wb)�marshal�open�create_stats�dump�stats)r�filer�frrr�
dump_stats,szProfile.dump_statscCs|j�|j�dS)N)�disable�snapshot_stats)rrrrr2szProfile.create_statscCs6|j�}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)Nrr��)Zgetstatsr�label�codeZ	callcountZreccallcountZ
inlinetimeZ	totaltime�idZcalls�KeyError)rZentriesZcallersdicts�entry�funcZncZcc�ttZctZcallersZsubentry�prevrrrr6s>






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

zProfile.runctxc
Os"|j�z
|||�S|j�XdS)N)r,r)rr%�args�kwrrr�runcalljs
zProfile.runcallN���)r1)
�__name__�
__module__�__qualname__rrrrrrr0rrrrrs
&	cCs(t|t�rdd|fS|j|j|jfSdS)N�~r)�
isinstance�str�co_filename�co_firstlineno�co_name)r!rrrr ss

r c
Cs&ddl}ddl}ddl}ddlm}d}||d�}d|_|jdddd	dd
�|jddd
ddt|jj	�d�|j
dd�s�|j�|jd�|j
�\}}||j
dd�<t|�dk�r|d}|jjd|jj|��t|d��}	t|	j�|d�}
WdQRX|dddd�}t|
|d|j|j�n|j�|S)Nr)�OptionParserz@cProfile.py [-o output_file_path] [-s sort] 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)r>r?r@�choicesr�rbr-r()�__file__r2�__package__�
__cached__r1)�os�sysrZoptparser;Zallow_interspersed_argsZ
add_option�sortedrZsort_arg_dict_default�argv�print_usage�exit�
parse_args�len�path�insert�dirnamer�compile�readrr=r
)rFrGrr;r<�parser�optionsr.Zprogname�fpr!Zglobsrrr�main{s8




rVr(r1)Nr1r1)Nr1)�__all__Z_lsprofZprofilerrr�__doc__ZProfilerrr rVr2rrrr�<module>s




X%

Zerion Mini Shell 1.0