Your IP : 3.145.99.221


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/cProfile.cpython-310.opt-2.pyc

o

6��f��@s�	gd�ZddlZddlZddlZddd�Zddd�Zejje_ejje_Gdd	�d	ej�Z	d
d�Z
dd
�Zedkr?e�dSdS))�run�runctx�Profile�N���cCst�t��|||�S�N)�
_pyprofile�_Utilsrr)�	statement�filename�sort�r�//opt/alt/python310/lib64/python3.10/cProfile.pyrsrcCst�t��|||||�Sr)rrrr)r	�globals�localsr
rrrr
rs�rc@sXeZdZ	ddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�ZdS)rrcCs$ddl}|�|����|���dS�Nr)�pstats�StatsZ
strip_dirsZ
sort_stats�print_stats)�selfrrrrr
r)szProfile.print_statscCsNddl}t|d��}|��|�|j|�Wd�dS1s wYdS)Nr�wb)�marshal�open�create_stats�dump�stats)r�filer�frrr
�
dump_stats-s
"�zProfile.dump_statscCs|��|��dSr)�disable�snapshot_stats�rrrr
r3szProfile.create_statsc
Cs$|��}i|_i}|D](}t|j�}|j}||j}|j}|j}i}	|	|t|j�<|||||	f|j|<q|D]Y}|j	r�t|j�}|j	D]K}
z	|t|
j�}	Wn	t
yWYqCw|
j}||
j}|
j}|
j}||	vr�|	|}||d7}||d7}||d7}||d7}||||f|	|<qCq6dS)Nr���)Zgetstatsr�label�codeZ	callcountZreccallcountZ
inlinetimeZ	totaltime�idZcalls�KeyError)r�entriesZcallersdicts�entry�funcZncZccZttZctZcallersZsubentry�prevrrr
r7sD



�
��zProfile.snapshot_statscCsddl}|j}|�|||�Sr)�__main__�__dict__r)r�cmdr,�dictrrr
r]szProfile.runcCs.|��z
t|||�W|��|S|��wr)�enable�execr)rr.rrrrr
rbs
�zProfile.runctxcOs,|��z||i|��W|��S|��wr)r0r)rr*�args�kwrrr
�runcallkszProfile.runcallcCs|��|Sr)r0r rrr
�	__enter__rszProfile.__enter__cGs|��dSr)r)r�exc_inforrr
�__exit__vszProfile.__exit__N)r)�__name__�
__module__�__qualname__rrrrrrr4r5r7rrrr
rs
&	rcCs$t|t�r
dd|fS|j|j|jfS)N�~r)�
isinstance�str�co_filename�co_firstlineno�co_name)r%rrr
r${s

r$c
Cs�ddl}ddl}ddl}ddl}ddlm}d}||d�}d|_|jdddd	dd
�|jddd
ddt|j	j
�d�|jdddddd�|jdd�sS|��|�
d�|��\}}||jdd�<|jdurm|j�|j�|_t|�dkr�|jr�d}	|j|dd�}
n3|d}|j�d|j�|��t�|��}t|��|d�}	Wd�n1s�wY|dddd�}
z
t|	|
d|j|j�W|Sty�}
zd|_|�
|
j�WYd}
~
|Sd}
~
ww|��|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--sortrz?Sort order when printing to stdout, based on pstats.Stats classr)rDrErF�choicesz-m�module�
store_truezProfile a library module)rD�actionrErFr!r"z(run_module(modname, run_name='__main__'))�
run_module�modnamer1r,)�__file__r8�__package__�
__cached__) �os�sys�runpyrZoptparserAZallow_interspersed_argsZ
add_option�sortedrZsort_arg_dict_default�argvZprint_usage�exit�
parse_argsrC�path�abspath�lenrHrK�insert�dirname�io�	open_code�compile�readrr�BrokenPipeError�stdout�errno)rPrQrRrrArB�parserZoptionsr2r%ZglobsZprogname�fp�excrrr
�main�sj

�

�
�

������rfr,)Nr)
�__all__Z_lsprofr\Zprofilerrr�__doc__ZProfilerrr$rfr8rrrr
�<module>s



_;
�

?>