ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python34/lib64/python3.4/__pycache__/cProfile.cpython-34.pyc

�
e f��@s�dZdddgZddlZddlZdddd�Zdddd�Zejje_ejje_Gd	d�dej�Zd
d�Z	dd
�Z
edkr�e
�ndS)zUPython interface for the 'lsprof' profiler.
   Compatible with the 'profile' module.
�run�runctx�Profile�N�cCstjt�j|||�S)N)�
_pyprofile�_Utilsrr)�	statement�filename�sort�r�-/opt/alt/python34/lib64/python3.4/cProfile.pyrscCs"tjt�j|||||�S)N)rrrr)r�globals�localsr	r
rrrrsc@smeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)raiProfile(custom_timer=None, time_unit=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, time_unit can
    be a float specifying a scale (i.e. how long each integer unit
    is, in seconds).
    rcCs2ddl}|j|�j�j|�j�dS)Nr)�pstatsZStatsZ
strip_dirsZ
sort_stats�print_stats)�selfr
rrrrr(szProfile.print_statsc
CsEddl}t|d��$}|j�|j|j|�WdQXdS)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r2s
zProfile.create_statscCs�|j�}i|_i}xz|D]r}t|j�}|j}||j}|j}|j}i}	|	|t|j�<|||||	f|j|<q"Wx�|D]�}|j	r�t|j�}x�|j	D]�}
y|t|
j�}	Wnt
k
r�w�YnX|
j}||
j}|
j}|
j}||	kru|	|}||d7}||d7}||d7}||d7}n||||f|	|<q�Wq�q�WdS)Nrr��)Zgetstatsr�label�codeZ	callcountZreccallcountZ
inlinetimeZ	totaltime�idZcalls�KeyError)rZentriesZcallersdicts�entry�funcZncZccZttZctZcallersZsubentry�prevrrrr6s>	
	
		 
	
	
		
zProfile.snapshot_statscCs(ddl}|j}|j|||�S)Nr)�__main__�__dict__r)r�cmdr&�dictrrrr\s	zProfile.runc
Cs0|j�zt|||�Wd|j�X|S)N)�enable�execr)rr(r
rrrrras

zProfile.runctxc
Os-|j�z|||�SWd|j�XdS)N)r*r)rr$�args�kwrrr�runcalljs
zProfile.runcallN���)�__name__�
__module__�__qualname__�__doc__rrrrrrr.rrrrrs&	cCs6t|t�rdd|fS|j|j|jfSdS)N�~r)�
isinstance�str�co_filename�co_firstlineno�co_name)r rrrrss
rcCs�ddl}ddl}ddlm}d}|d|�}d|_|jdddd	d
ddd�|jd
dddd
ddd�|jdd�s�|j�|jd�n|j	�\}}||jdd�<t
|�dkr�|d}|jjd|jj
|��t|d��}t|j�|d�}	WdQXi|d6dd6dd6dd6}
t|	|
d|j|j�n
|j�|S)Nr)�OptionParserz@cProfile.py [-o output_file_path] [-s sort] scriptfile [arg] ...�usageFz-oz	--outfile�dest�outfile�helpzSave stats to <outfile>�defaultz-sz--sortr
z?Sort order when printing to stdout, based on pstats.Stats classrr�rbr+�__file__r&r0�__package__�
__cached__r/)�os�sysZoptparser:Zallow_interspersed_argsZ
add_option�argvZprint_usage�exit�
parse_args�len�path�insert�dirnamer�compile�readrr=r
)rDrEr:r;�parserZoptionsr,Zprogname�fpr Zglobsrrr�main{s8	




rQr&r/r/)r3�__all__Z_lsprofZprofilerrrZProfilerrrrQr0rrrr�<module>sX$

Zerion Mini Shell 1.0