Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/profile.cpython-311.opt-2.pyc

�

c��fpY���	ddlZddlZddlZddlZgd�ZGd�d��Zdd�Zdd�ZGd�d	��Zd
�Z	e
dkre	��dSdS)
�N)�run�runctx�Profilec�(�eZdZ	d�Zd�Zd�Zd�ZdS)�_Utilsc��||_dS�N)�profiler)�selfr
s  �./opt/alt/python311/lib64/python3.11/profile.py�__init__z_Utils.__init__0s
�� ��
�
�
�c���|���}	|�|��n#t$rYnwxYw|�|||��dS#|�|||��wxYwr	)r
r�
SystemExit�_show)r�	statement�filename�sort�profs     rrz
_Utils.run3s����}�}����	-��H�H�Y�������	�	�	��D�	����
�J�J�t�X�t�,�,�,�,�,��D�J�J�t�X�t�,�,�,�,���s!�,�A�
9�A�9�A�A.c���|���}	|�|||��n#t$rYnwxYw|�|||��dS#|�|||��wxYwr	)r
rrr)rr�globals�localsrrrs       rrz
_Utils.runctx<s����}�}����	-��K�K�	�7�F�3�3�3�3���	�	�	��D�	����
�J�J�t�X�t�,�,�,�,�,��D�J�J�t�X�t�,�,�,�,���s!�.�A�
;�A�;�A�A0c�b�|�|�|��dS|�|��dSr	)�
dump_stats�print_stats)rrrrs    rrz_Utils._showEs:�����O�O�H�%�%�%�%�%����T�"�"�"�"�"rN)�__name__�
__module__�__qualname__r
rrr�rrrr*sU�������
!�!�!�-�-�-�-�-�-�#�#�#�#�#rr���c�V�	tt���|||��Sr	)rrr)rrrs   rrrQs'��	��'�?�?���y�(�D�9�9�9rc�Z�	tt���|||||��Sr	)rrr)rrrrrs     rrr^s+���
�'�?�?�!�!�)�W�f�h��M�M�Mrc���eZdZ	dZdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Ze
e	eeeed�Z
d
�ZGd�d��ZGd�d��Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd d�Zd�ZdS)!rrNc��i|_d|_d|_d|_|�|j}||_|s%t
jx|_|_|j	|_
n�||_|���}	t|��}|dkr
|j|_
n|j
|_
|tfd�}||_n##t$r||_|j	|_
YnwxYw|���|_|�d��dS)N��c�(�||����Sr	r)�timer�sums  r�get_time_timerz(Profile.__init__.<locals>.get_time_timer�s���3�u�u�w�w�<�<�'rr
)�timings�cur�cmd�c_func_name�bias�time�process_timer(�get_time�trace_dispatch_i�
dispatcher�len�trace_dispatch�trace_dispatch_lr)�	TypeError�t�
simulate_call)rr(r/r9�lengthr*s      rr
zProfile.__init__�s���������������<��9�D���	��	/�)-�):�:�D�J���"�3�D�O�O��D�J��
�
���A�
/��Q����
�Q�;�;�&*�&9�D�O�O�&*�&;�D�O�*/�C�(�(�(�(� .��
�
���
8�
8�
8� %��
�"&�"7�����
8���� ����������:�&�&�&�&�&s�0B1�1C�Cc�H�|j}|��}|d|dz|jz
|jz
}|dkr|j|_|j||||��r"|��}|d|dz|_dS|��}|d|dz|z
|_dS)Nr��c_call�r(r9r/rr.�dispatch)r�frame�event�argr(r9�rs       rr6zProfile.trace_dispatch�s����
���E�G�G��
�a�D�1�Q�4�K�$�&� �4�9�,���H���"�|�D���4�=����e�A�.�.�	%�����A��q�T�A�a�D�[�D�F�F�F�����A��q�T�A�a�D�[�1�_�D�F�F�Frc���|j}|��|jz
|jz
}|dkr|j|_|j||||��r|��|_dS|��|z
|_dS�Nr>r?�rrArBrCr(r9s      rr3zProfile.trace_dispatch_i�sz���
���E�G�G�d�f��t�y�(���H���"�|�D���4�=����e�Q�/�/�	!��U�W�W�D�F�F�F��U�W�W�q�[�D�F�F�Frc���|j}|��dz|jz
|jz
}|dkr|j|_|j||||��r|��dz|_dS|��dz|z
|_dS)NgN@r>r?rGs      r�trace_dispatch_maczProfile.trace_dispatch_mac�s����
���E�G�G�D�L�4�6�!�D�I�-���H���"�|�D���4�=����e�Q�/�/�	&��U�W�W�T�\�D�F�F�F��U�W�W�T�\�A�%�D�F�F�Frc���|j}|��|jz
|jz
}|dkr|j|_|j||||��r|��|_dS|��|z
|_dSrF)r2r9r/rr.r@)rrArBrCr2r9s      rr7zProfile.trace_dispatch_l�sz���=���H�J�J����$�)�+���H���"�|�D���4�=����e�Q�/�/�	$��X�Z�Z�D�F�F�F��X�Z�Z�!�^�D�F�F�Frc�z�|j\}}}}}}||ur|r|�||��S|||z||||f|_dS�Nr=)r,�trace_dispatch_return)	rrAr9�rpt�rit�ret�rfn�rframe�rcurs	         r�trace_dispatch_exceptionz Profile.trace_dispatch_exception�sY��+/�8�(��S�#�s�F�D��%���T���-�-�f�a�8�8�8���A��s�C���5����qrc�t�|jrR|j|jdur>|j\}}}}}}t|tj��s|�|d��|j}	|	j|	j|	j	f}
|dd|
||jf|_|j
}|
|vr||
\}}
}}}||
dz|||f||
<n
ddddif||
<dS�N���rr=)r,�f_back�
isinstancer�
fake_framerM�f_code�co_filename�co_firstlineno�co_namer+)rrAr9rNrOrPrQrRrS�fcode�fnr+�cc�ns�tt�ct�callerss                 r�trace_dispatch_callzProfile.trace_dispatch_calls����8�		F���D�H�R�L�8�8�/3�x�,�C��c�3����f�g�&8�9�9�
F��*�*�6�1�5�5�5�������!5�u�}�
E���q�!�R����1����,��
��=�=�&-�b�k�#�B��B��G��b�1�f�b�"�g�5�G�B�K�K��Q��1�b�.�G�B�K��qrc��dd|jf}|dd|||jf|_|j}||vr||\}}}}}	||dz|||	f||<n
ddddif||<dS)Nr%rr=)r.r,r+)
rrAr9r`r+rarbrcrdres
          r�trace_dispatch_c_callzProfile.trace_dispatch_c_calls}���!�T�%�
&���q�!�R����1����,��
��=�=�&-�b�k�#�B��B��G��b��d�B��G�3�G�B�K�K��Q��1�b�.�G�B�K��qrc�`�||jdur!|�|jdd��|j\}}}}}}||z}||z}|\}	}
}}}
}|	|
|z||z||
|f|_|j}||\}}}}}|s
||z}|dz}||vr||dz||<nd||<||dz
||z||f||<dSrV)r,rMr+)rrAr9rNrOrPrQrS�frame_total�ppt�pit�pet�pfn�pframe�pcurr+rarbrcrdres                     rrMzProfile.trace_dispatch_return"s�������$�$��&�&�t�x��|�Q�7�7�7�
+/�(�'��S�#�s�E�4��A�g���C�i��+/�(��S�#�s�F�D���c�	�3��#4�c�6�4�G����,��")�#�,���B��B���	�
�k�!�B��a��B��'�>�>�"�3�<�!�+�G�C�L�L�
�G�C�L��2��6�2��8�R��8�����qr)�call�	exception�returnr>�c_exception�c_returnc�\�|jdrdS||_|�|��dS�Nr )r,r-r:)rr-s  r�set_cmdzProfile.set_cmdXs3���8�B�<����������3�����rc��eZdZd�Zd�ZdS)�Profile.fake_codec�>�||_||_||_d|_dS�Nr)r\�co_liner^r])rr�line�names    rr
zProfile.fake_code.__init__^s&��'�D���D�L��D�L�"#�D���rc�D�t|j|j|jf��Sr	)�reprr\r}r^�rs r�__repr__zProfile.fake_code.__repr__ds����)�4�<���F�G�G�GrN)rrrr
r�rrr�	fake_coderz]s7������	$�	$�	$�	H�	H�	H�	H�	Hrr�c��eZdZd�ZdS)�Profile.fake_framec�"�||_||_dSr	)r[rX)r�code�priors   rr
zProfile.fake_frame.__init__hs���D�K��D�K�K�KrN)rrrr
rrrrZr�gs#������	 �	 �	 �	 �	 rrZc��|�dd|��}|jr|jd}nd}|�||��}|jd||d��dS)N�profilerrWrq)r�r,rZr@)rrr�rorAs     rr:zProfile.simulate_calllsg���~�~�i��D�1�1���8�	��X�b�\�F�F��F�����f�-�-����
�f��d�E�1�-�-�-�-�-rc���|j}|��|jz
}|jdr2|jd||jd|��d}|jd�2|��|z
|_dS)Nr rsrWr)r2r9r,r@)rr2r9s   r�simulate_cmd_completezProfile.simulate_cmd_completexsx���=���H�J�J������h�r�l�	�
$�D�M�(�#�D�$�(�2�,��:�:�:��A�	�h�r�l�	�
����a�����rr c��ddl}|�|������|�����dSr|)�pstats�Stats�
strip_dirs�
sort_statsr)rrr�s   rrzProfile.print_stats�sC���
�
�
����T���%�%�'�'�2�2�4�8�8��+�-�-�-�-�-rc��t|d��5}|���tj|j|��ddd��dS#1swxYwYdS)N�wb)�open�create_stats�marshal�dump�stats)r�file�fs   rrzProfile.dump_stats�s���
�$��
�
�	(���������L���Q�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	(�	(s�/A
�
A�Ac�V�|���|���dSr	)r��snapshot_statsr�s rr�zProfile.create_stats�s,���"�"�$�$�$��������rc���i|_|j���D]L\}\}}}}}|���}d}|���D]}||z
}�|||||f|j|<�MdSr|)r�r+�items�copy�values)	r�funcrarbrcrdre�nc�callcnts	         rr�zProfile.snapshot_stats�s�����
�/3�|�/A�/A�/C�/C�	7�	7�+�D�+�2�r�2�r�7��l�l�n�n�G��B�"�>�>�+�+�
�
���g�
���!�2�r�2�w�6�D�J�t���	7�	7rc�F�ddl}|j}|�|||��Sr|)�__main__�__dict__r)rr-r��dicts    rrzProfile.run�s)������� ���{�{�3��d�+�+�+rc���|�|��tj|j��	t	|||��tjd��n#tjd��wxYw|Sr	)rx�sys�
setprofiler4�exec)rr-rrs    rrzProfile.runctx�sk�����S������t��'�'�'�	!���g�v�&�&�&��N�4� � � � ��C�N�4� � � � �����s�A�A,c���|�t|����tj|j��	||i|��tjd��S#tjd��wxYwr	)rxr�r�r�r4)rr��args�kws    r�runcallzProfile.runcall�sl�����T�$�Z�Z� � � ���t��'�'�'�	!��4��$��$�$��N�4� � � � ��C�N�4� � � � ���s�A�A/c��|jturtd���|j}d|_	|�||��||_S#||_wxYw)Nz&Subclasses must override .calibrate().r)�	__class__rr8r/�_calibrate_inner)r�m�verbose�
saved_biass    r�	calibratezProfile.calibrate�s`���>��(�(��D�E�E�E��Y�
���	�	#��(�(��G�4�4�"�D�I�I��
�D�I�"�"�"�"s�A
�
	Ac��|j}d�}|fd�}||��|��}||��|��}||z
}|rtd|��t��}	|��}|	�dt	��t����|��}||z
}
|rtd|
��d}d}|	j���D]\\}
}}\}}}}}|dvr
||z
}||z
}�|r td|��td	|��||d
zkrtd|z���||z
dz|z}|rtd
|��|S)Nc�.�t|��D]}d}�dSrL��range)�n�i�xs   r�f1z$Profile._calibrate_inner.<locals>.f1�s(���1�X�X�
�
�����
�
rc�@�t|��D]
}|d���dS)N�dr�)r�r�r�s   rr�z#Profile._calibrate_inner.<locals>.f�s0���1�X�X�
�
����3�����
�
rz elapsed time without profiling =zf(m)zelapsed time with profiling =g)r�r�z!'CPU seconds' profiler reported =ztotal # calls =r=z internal error: total calls = %dg@z+mean stopwatch overhead per profile event =)	r2�printrrrrr+r��
ValueError)rr�r�r2r�r��t0�t1�elapsed_noprofile�p�elapsed_profile�total_calls�
reported_timerr~�funcnamerarbrcrdre�means                      rr�zProfile._calibrate_inner�s����=��	�	�	��	�	�	�	�	
��!�����X�Z�Z��	��!����
�X�Z�Z����G���	I��4�6G�H�H�H�

�I�I��
�X�Z�Z��	�������F�H�H�-�-�-�
�X�Z�Z���r�'���	D��1�?�C�C�C����
��	���!�!�	$�	$�A�&�X�t�X�(A��R��R���;�&�&��r�!����#�
���	2��5�}�E�E�E��#�[�1�1�1��!�a�%����?�+�M�N�N�N�� 1�1�S�8�;�F���	G��?��F�F�F��r)NN)r )r)rrrr/r
r6r3rIr7rTrfrhrMr@rxr�rZr:r�rrr�r�rrr�r�r�rrrrrgs�������$�L
�D�#'�#'�#'�#'�N
%�
%�
%�$
!�
!�
!�
&�
&�
&�
$�
$�
$�&������,	�	�	�#�#�#�N$�-�'�'�,�)�

�
�H�  � � �
H�H�H�H�H�H�H�H� � � � � � � � �
.�.�.� � � � � � � �
(�(�(�
���7�7�7�,�,�,�
���!�!�!�b	#�	#�	#�	#�<�<�<�<�<rrc�l�ddl}ddlm}d}||���}d|_|�dddd	d�
��|�ddd
dd���|�ddddd�
��t
jdd�s(|���tjd��|�	��\}}|t
jdd�<|j
�$|j�|j
��|_
t|��dk�r|jrddl}d}|j|dd�}n�|d}	t
j�d|j�|	����t'j|	��5}
t+|
���|	d��}ddd��n#1swxYwY|	dddd�}	t/||d|j
|j��nP#t2$r/}dt
_tj|j��Yd}~nd}~wwxYw|���|S)Nr)�OptionParserzMprofile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...)�usageFz-oz	--outfile�outfilezSave stats to <outfile>)�dest�help�defaultz-m�module�
store_truezProfile a library module.)r��actionr�r�z-sz--sortrz?Sort order when printing to stdout, based on pstats.Stats classr r=r&z(run_module(modname, run_name='__main__'))�
run_module�modnamer�r�)�__file__r�__package__�
__cached__)�os�optparser��allow_interspersed_args�
add_optionr��argv�print_usage�exit�
parse_argsr��path�abspathr5r��runpyr��insert�dirname�io�	open_code�compile�readrr�BrokenPipeError�stdout�errno)r�r�r��parser�optionsr�r�r��globs�progname�fp�excs            r�mainr�)s���
�I�I�I�%�%�%�%�%�%�[�E�
�\��
&�
&�
&�F�%*�F�"�
���d�K�i�
&���6�6�6�
���d��,�
(�%��9�9�9�
���d�H�6�
N�������8�A�B�B�<���������������'�'�)�)�O�W�d��C�H�Q�Q�Q�K���"��'�/�/�'�/�:�:���
�4�y�y�1�}�}��>�	��L�L�L�=�D�#�.���7���E�E�
�A�w�H��H�O�O�A�r�w���x�8�8�9�9�9���h�'�'�
<�2��r�w�w�y�y�(�F�;�;��
<�
<�
<�
<�
<�
<�
<�
<�
<�
<�
<����
<�
<�
<�
<�%�&�#�"�	��E�	 ��4���g�o�w�|�D�D�D�D���	 �	 �	 ��C�J��H�S�Y�������������	 ����
	�������Ms*�$F3�3F7�:F7�G$�$
H�.%H�Hr�rw)r�r�r0r��__all__rrrrr�rrrr�<module>r�s���'�$
�	�	�	�
�
�
�
���������
&�
&�
&��#�#�#�#�#�#�#�#�N:�:�:�:�N�N�N�N�~�~�~�~�~�~�~�~�D6�6�6�r�z����D�F�F�F�F�F��r

Hacked By AnonymousFox1.0, Coded By AnonymousFox