Your IP : 3.147.73.117


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

�

c��f�r���	ddlZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
gd�Zee��Gd�d����Zed	�
��Gd�d����Zed	�
��Gd
�d����ZGd�d��ZGd�d��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zedkr�ddlZ	ddlZn#e$rYnwxYwGd�dej��Z e!ej"��dkrej"dZ#ndZ#	e e#��Z$ej"dd�D]Z%e$�&e%���e'de$j(� ��e$�)��e'd!e$j(� ��dS#e*$rYdSwxYwdS)"�N)�StrEnum�_simple_enum)�
cmp_to_key)�	dataclass)�Dict)�Stats�SortKey�FunctionProfile�StatsProfilec�8�eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
�ZdS)r	)�calls�ncalls)�
cumulative�cumtime)�filename�module�line�name�nfl�pcalls�stdname)�time�tottimec��|d}t�||��}||_|dd�D]}||j|<�
||_|S�Nr�)�str�__new__�_value_�_value2member_map_�_all_values)�cls�values�value�obj�other_values     �-/opt/alt/python311/lib64/python3.11/pstats.pyrzSortKey.__new__0sX���q�	���k�k�#�u�%�%�����!�!�"�"�:�	6�	6�K�25�C�"�;�/�/� ����
�N)
�__name__�
__module__�__qualname__�CALLS�
CUMULATIVE�FILENAME�LINE�NAME�NFL�PCALLS�STDNAME�TIMEr�r(r'r	r	$sP�������E�(�J�#�H��D��D�
�C�
�F��G��D�����r(r	T)�unsafe_hashc�V�eZdZUeed<eed<eed<eed<eed<eed<eed<dS)	r
rr�percall_tottimer�percall_cumtime�	file_name�line_numberN)r)r*r+r�__annotations__�float�intr5r(r'r
r
:sZ��������K�K�K�
�N�N�N�����
�N�N�N������N�N�N������r(r
c�6�eZdZU	eed<eeefed<dS)r�total_tt�
func_profilesN)r)r*r+r=r<rrr
r5r(r'rrDs4�������:��O�O�O���_�,�-�-�-�-�-�-r(rc��eZdZ	dd�d�Zd�Zd�Zd�Zd�Zd�Zd	d	d
d
dddd
dddddd�
Z	d�Z
d�Zd�Zd�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd#d �Zd!�Zd"�ZdS)$rN)�streamc��|ptj|_t|��sd}n|d}|dd�}|�|��|j|�dSr)�sys�stdoutrC�len�init�add)�selfrC�args�args    r'�__init__zStats.__init__ls[���*��
����4�y�y�	��C�C��q�'�C�����8�D��	�	�#�������$����r(c�v�d|_g|_d|_d|_d|_d|_d|_t��|_i|_	i|_
|�|��	|���dS#t$r/td|jr
|jdndz|j����wxYw)NrzInvalid timing data %s������file)�all_callees�files�fcn_listr@�total_calls�
prim_calls�max_name_len�set�	top_level�stats�
sort_arg_dict�
load_stats�get_top_level_stats�	Exception�printrC)rJrLs  r'rHz
Stats.initvs��������
���
���
�����������������
�����������	��$�$�&�&�&�&�&���	�	�	��*�%)�Z�7�4�:�b�>�>�R�9�?C�{�
L�
L�
L�
L��	���s�)A?�?9B8c��|�	i|_dSt|t��r�t|d��5}t	j|��|_ddd��n#1swxYwY	t
j|��}tj	|j
��dz|z}n#YnxYw|g|_n7t|d��r'|�
��|j|_i|_|jstd|j�d|�����dS)N�rbz    �create_statszCannot create or construct a z
 object from )r[�
isinstancer�open�marshal�load�os�statr�ctime�st_mtimerT�hasattrrc�	TypeError�	__class__)rJrL�f�
file_statss    r'r]zStats.load_stats�sF���;��D�J��F�
��S�
!�
!�	��c�4���
-�A�$�\�!�_�_��
�
-�
-�
-�
-�
-�
-�
-�
-�
-�
-�
-����
-�
-�
-�
-�
��W�S�\�\�
��j��!4�5�5��>��D����
��������D�J�J�
�S�.�
)�
)�	���������D�J��C�I��z�	5��)�#�~�~�~�s�s�4�5�5�
5��s�A�A�A�#3B�Bc�x�|j���D]�\}\}}}}}|xj|z
c_|xj|z
c_|xj|z
c_d|vr|j�|��tt|����|j	kr!tt|����|_	��dS)N)�jprofiler�profiler)
r[�itemsrVrWr@rZrIrG�func_std_stringrX)rJ�func�cc�nc�tt�ct�callerss       r'r^zStats.get_top_level_stats�s���/3�z�/?�/?�/A�/A�	?�	?�+�D�+�2�r�2�r�7�����"����O�O��"�O�O��M�M��"�M�M�*�g�5�5���"�"�4�(�(�(��?�4�(�(�)�)�D�,=�=�=�$'���(=�(=�$>�$>��!��	?�	?r(c�t�|s|St|��D�]"}t|��t|��krt|��}|xj|jz
c_|xj|jz
c_|xj|jz
c_|xj|jz
c_|jD]}|j�|���|j	|j	kr|j	|_	d|_
|j���D];\}}||jvr|j|}nddddif}t||��|j|<�<��$|S�Nr)�reversed�typerrTrVrWr@rZrIrXrUr[rt�add_func_stats)rJ�arg_list�itemrvri�
old_func_stats      r'rIz	Stats.add�sX���	��K��X�&�&�	G�	G�D��D�z�z�T�$�Z�Z�'�'��T�{�{���J�J�$�*�$�J�J����� 0�0����O�O�t��.�O�O��M�M�T�]�*�M�M���
)�
)����"�"�4�(�(�(�(�� �4�#4�4�4�$(�$5��!� �D�M�"�j�.�.�0�0�
G�
G�
��d��4�:�%�%�$(�J�t�$4�M�M�%&��1�a��$5�M�#1�-��#F�#F��
�4� � �
G��r(c��	t|d��5}tj|j|��ddd��dS#1swxYwYdS)N�wb)rerf�dumpr[)rJrros   r'�
dump_statszStats.dump_stats�s���H�
�(�D�
!�
!�	(�Q��L���Q�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	(�	(s
�:�>�>)))rrOz
call count)))�rOzcumulative time))��rz	file name))��rzline number))��rz
function name))r�r�r�zname/file/line)))rrOzprimitive call count)))�rz
standard name)))�rOz
internal time)
r
rrrrrrrrrrrrc���	|jsTix|_}i}|j���D]'\}}|}|r|sn||vrd||<n|||<|dd�}|��(|D]}||=�|jS)NrrO)r\�sort_arg_dict_defaultrt)rJ�dict�bad_list�word�tup�fragments      r'�get_sort_arg_defszStats.get_sort_arg_defs�s���7��!�	�(*�*�D����H�!�7�=�=�?�?�	
-�	
-�	��c����-�#����4�'�'�-.���*��%(�D��N�'����}�H��-��!�
�
����J�J��!�!r(c��|s	d|_|St|��dkr0t|dt��rddddd�|dg}nUt|��dkrB|dd�D]7}t	|��t	|d��krtd	����8|���}d
}d|_d}|D]P}t|t��r|j	}|||dz}|xj|||dzz
c_d}�Qg}|j
���D]9\}\}	}
}}}
|�|	|
||f|zt|��|fz���:|�tt!|��j���
��gx|_}|D]}|�|d���|S)Nrrrr
rr)rOrrr�r�zCan't have mixed argument typer5rPz, )�keyrO)rUrGrdr>rrmr��	sort_typer	r$r[rt�appendru�sortr�	TupleComp�compare)rJ�fieldrL�
sort_arg_defs�
sort_tuple�	connectorr��
stats_listrvrwrxryrzr{rU�tuples                r'�
sort_statszStats.sort_stats�s���	��D�M��K��u�:�:��?�?�z�%��(�C�8�8�?�$�"�!�'�)�)�*/�q��3�5�E�E���Z�Z�1�_�_��Q�R�R�y�
F�
F����9�9��U�1�X���.�.�#�$D�E�E�E�/��.�.�0�0�
��
�����	��	�	�D��$��(�(�
"��z��#�m�D�&9�!�&<�<�J��N�N�i�-��*=�a�*@�@�@�N�N��I�I��
�/3�z�/?�/?�/A�/A�	=�	=�+�D�+�2�r�2�r�7����r�2�r�2�.��5�.�t�4�4�d�;�<�
=�
=�
=�
=�	���J�y��'<�'<�'D�E�E��F�F�F�#%�%��
���	'�	'�E��O�O�E�"�I�&�&�&�&��r(c�F�|jr|j���|S�N)rU�reverse�rJs r'�
reverse_orderzStats.reverse_orders%���=�	$��M�!�!�#�#�#��r(c	�f�|j}ix|_}d}|���D]�\}\}}}}}	t|��}
tt	|
����|krtt	|
����}i}|	���D]\}}
|
|t|��<�|
|vrt||
|||||f��||
<��|||||f||
<��|j}t��x|_}|D]$}|�t|�����%||_	d|_
d|_|Sr})r[rt�func_strip_pathrGrur�rZrYrIrXrUrS)rJ�oldstats�newstatsrXrvrwrxryrzr{�newfunc�
newcallers�func2�caller�old_top�new_tops                r'�
strip_dirszStats.strip_dirssj���:�� "�"��
�X���/7�~�~�/?�/?�
	A�
	A�+�D�+�2�r�2�r�7�%�d�+�+�G��?�7�+�+�,�,�|�;�;�"�?�7�#;�#;�<�<���J�!(�����
<�
<�
��v�5;�
�?�5�1�1�2�2��(�"�"�$2�(0��(9�)+�R��R��(D�%F�%F���!�!�&(��R��Z�$@���!�!��.��#&�5�5�(�����	/�	/�D��K�K���-�-�.�.�.�.�(�����
�����r(c���|jrdSix|_}|j���D]B\}\}}}}}||vri||<|���D]\}}	||vri||<|	|||<��CdSr�)rSr[rt)
rJrSrvrwrxryrzr{r�r�s
          r'�calc_calleeszStats.calc_callees6s�����	��F�)+�+���;�/3�z�/?�/?�/A�/A�	3�	3�+�D�+�2�r�2�r�7��;�&�&�$&��D�!�!(�����
3�
3�
��v���+�+�)+�K��&�,2��E�"�4�(�(�
3�	�r(c��|}t|t��rv	tj|��}n!#tj$r|d|zz
}||fcYSwxYwg}|D]9}|�t
|����r|�|���:n�t|��}t|t��r0d|cxkrdkr#nn t||zdz��}|d|�}n1t|t��rd|cxkr|krnn|}|d|�}t|��t|��kr)|dt|���dt|���d|�d	�z
}||fS)
Nz#   <Invalid regular expression %r>
gg�?g�?rz   List reduced from z to z due to restriction <z>
)rdr�re�compile�error�searchrur�rGr=r>)rJ�sel�list�msg�new_list�rexrv�counts        r'�eval_print_amountzStats.eval_print_amountIs������c�3���	(�
%��j��o�o�����8�
%�
%�
%��=��C�C����}�$�$�$�
%�����H��
*�
*���:�:�o�d�3�3�4�4�*��O�O�D�)�)�)��
*���I�I�E��#�u�%�%�
(�#��*:�*:�*:�*:�s�*:�*:�*:�*:�*:��E�C�K�"�,�-�-������<����C��%�%�
(�!�s�*:�*:�*:�*:�U�*:�*:�*:�*:�*:�������<���t�9�9��H�
�
�%�%��C��D�	�	�	�	�3�x�=�=�=�=�#�#�#�/�
/�C���}�s�.�A�Ac
���	|jr|jdd�n%t|j�����}|st	di��Stt
|j����}i}t	||��}|D]�}|j|\}}}}	}
|\}}}
||krt|��n!t|��dzt|��z}tt
|����}|dkrdntt
||z����}tt
|	����}|dkrdntt
|	|z����}t|||||||��}|||
<��|S)Nr�/rO)
rUr�r[�keysrr=�f8r@rr
)rJ�	func_listr@rA�
stats_profilervrwrxryrzr{r:r;�	func_namerrr8rr9�func_profiles                    r'�get_stats_profilezStats.get_stats_profilecs{��	�
)-�
�R�D�M�!�!�!�$�$�4��
���@Q�@Q�;R�;R�	��	'���2�&�&�&���D�M�*�*�+�+���
�$�X�}�=�=�
��	4�	4�D�&*�j��&6�#�B��B��G�04�-�I�{�I� "�b���S��W�W�W�s�2�w�w��}�s�2�w�w�/F�F��B�r�F�F�m�m�G�$&�!�G�G�b�b��r�"�R�%�y�y�1A�1A�O��B�r�F�F�m�m�G�$&�!�G�G�b�b��r�"�R�%�y�y�1A�1A�O�*����������L�(4�M�)�$�$��r(c��|j}|jr|jdd�}d|jzdz}n(t|j�����}d}|D]}|�|||��\}}�t|��}|sd|fSt||j	���|t|j��krCd}|D]>}tt|����|krtt|����}�?|dz|fS)Nz   Ordered by: �
z!   Random listing order was used
rrQr�)rXrUr�r�r[r�r�rGr`rCru)rJ�sel_list�width�	stat_listr��	selectionr�rvs        r'�get_print_listzStats.get_print_list�s���!���=�	7��
�a�a�a�(�I�#�d�n�4�t�;�C�C��T�Z�_�_�.�.�/�/�I�6�C�!�	O�	O�I�!�3�3�I�y�#�N�N�N�I�s�s��I�����	 ��i�<��
�c���$�$�$�$��3�t�z�?�?�"�"��E�!�
7�
7�����-�-�.�.��6�6���� 5� 5�6�6�E���Q�w�	�!�!r(c���|jD]}t||j����|jrt|j���d}|jD]&}t|t	|��|j����'t||jdd|j���|j|jkrtd|jzd|j���td|jz|j���t|j���|�|��\}}|rX|�	��|D]}|�
|���t|j���t|j���|S)NrQ�        zfunction calls� ��endrRz(%d primitive calls)zin %.3f seconds)rTr`rCrZ�func_get_function_namerVrWr@r��print_title�
print_line)rJ�amountr�indentrvr�r�s       r'�print_statszStats.print_stats�s����
�	.�	.�H��(���-�-�-�-�-��:�	$��t�{�#�#�#�#����N�	J�	J�D��&�0��6�6�T�[�I�I�I�I�I�
�f�d�&�(8�c���T�T�T�T���t��.�.��(�4�?�:��$�+�V�V�V�V�
��$�-�/�d�k�B�B�B�B�
�4�;������)�)�&�1�1���t��	$��������
&�
&������%�%�%�%��t�{�#�#�#�#��t�{�#�#�#�#��r(c�r�|�|��\}}|r�|���|�|d��|D]E}||jvr#|�|||j|���.|�||i���Ft|j���t|j���|S)Nz	called...rQ)r�r��print_call_headingrS�print_call_liner`rC)rJr�r�r�rvs     r'�
print_calleeszStats.print_callees�s����)�)�&�1�1���t��
	$��������#�#�E�;�7�7�7��
:�
:���4�+�+�+��(�(���d�6F�t�6L�M�M�M�M��(�(���b�9�9�9�9��t�{�#�#�#�#��t�{�#�#�#�#��r(c��|�|��\}}|rp|�|d��|D]-}|j|\}}}}}	|�|||	d���.t	|j���t	|j���|S)Nzwas called by...z<-rQ)r�r�r[r�r`rC)
rJr�r�r�rvrwrxryrzr{s
          r'�
print_callerszStats.print_callers�s����)�)�&�1�1���t��	$��#�#�E�+=�>�>�>��
A�
A��*.�*�T�*:�'��B��B���$�$�U�D�'�4�@�@�@�@��t�{�#�#�#�#��t�{�#�#�#�#��r(c�t�td�|��|z|j���d}|j���D]O\}}}}}|rEtt
|�������}	t|	t��}n�P|rtd|zdz|j���dSdS)Nz	Function rQFr�z    ncalls  tottime  cumtime)	r`�ljustrCr[r#�next�iterrdr�)
rJ�	name_size�column_title�	subheaderrwrxryrzr{r$s
          r'r�zStats.print_call_heading�s���
�k���	�*�*�\�9���L�L�L�L��	�'+�z�'8�'8�':�':�	�	�#�B��B��G��
��T�'�.�.�"2�"2�3�3�4�4��&�u�e�4�4�	���
��	T��#�i�-�"@�@�t�{�S�S�S�S�S�S�	T�	Tr(�->c	���tt|���|��|zd|j���|st|j���dSt	|�����}d}|D]�}t|��}||}	t
|	t��rn|	\}
}}}
|
|krd|
|fz}nd|
fz}|�ddt|��zz���dt|���dt|
���d	|��}|d
z}n-|�d|	�dt|j|d
����}|d
z}t||z|z|j���d}��dS)Nr�r�rQrPz%d/%dz%dr�r�z  r�(z) r�)r`rur�rC�sortedr�rdr��rjustrGr�r[)rJr��source�	call_dict�arrow�clistr�rvrr$rxrwryrz�substats�
left_widths                r'r�zStats.print_call_line�s���
�o�f�%�%�+�+�I�6�6��>�C�d�k�Z�Z�Z�Z��	��t�{�#�#�#�#��F��y�~�~�'�'�(�(�����	�	�D�"�4�(�(�D��d�O�E��%��'�'�
+�!&���B��B���8�8�&�"�b��1�H�H�#�r�e�|�H�-5�^�^�A�a��F���m�O�-L�-L�-L�-L�-/��V�V�V�V�R��V�V�V�V�T�T�C��&��]�
�
�*.�$�$����r�$�*�T�:J�1�:M�7N�7N�7N�O��&��]�
��&��#�h�.�T�[�A�A�A�A��F�F�!	�	r(c�`�tdd|j���td|j���dS)Nz-   ncalls  tottime  percall  cumtime  percallr�r�zfilename:lineno(function)rQ�r`rCr�s r'r�zStats.print_title�s6��
�=�3�T�[�Y�Y�Y�Y�
�)���<�<�<�<�<�<r(c��|j|\}}}}}t|��}||kr|dzt|��z}t|�d��d|j���tt|��d|j���|dkrtdd|j���n'tt||z��d|j���tt|��d|j���|dkrtdd|j���n'tt||z��d|j���tt
|��|j���dS)Nr��	r�r�rr�rQ)r[rr`r�rCr�ru)rJrvrwrxryrzr{�cs        r'r�zStats.print_line�sG��"&�*�T�"2���B��B����G�G��
��8�8��C��#�b�'�'�!�A�
�a�g�g�a�j�j�c���4�4�4�4�
�b��f�f�#�D�K�0�0�0�0�
��7�7��%�S�t�{�3�3�3�3�3��"�R��U�)�)��4�;�7�7�7�7�
�b��f�f�#�D�K�0�0�0�0�
��7�7��%�S�t�{�3�3�3�3�3��"�R��U�)�)��4�;�7�7�7�7�
�o�d�#�#�$�+�6�6�6�6�6�6r()r�)r)r*r+rMrHr]r^rIr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r5r(r'rrJs��������B&*���������&���,?�?�?����4(�(�(�D�C�H�H�B�D�B�F�G�M�F�F�F���� "�"�"�&%�%�%�N���
���:���&���4!�!�!�F"�"�"�0���.
�
�
�	�	�	�
T�
T�
T�����2=�=�=�7�7�7�7�7r(rc��eZdZ	d�Zd�ZdS)r�c��||_dSr���comp_select_list)rJrs  r'rMzTupleComp.__init__s�� 0����r(c�j�|jD]*\}}||}||}||kr|cS||kr|cS�+dSr}r�)rJ�left�right�index�	direction�l�rs       r'r�zTupleComp.comparesa�� $� 5�	!�	!��E�9��U��A��e��A��1�u�u�!�z�!�!�!��1�u�u� � � � ���qr(N)r)r*r+rMr�r5r(r'r�r�
s7������&�1�1�1�����r(r�c�R�|\}}}tj�|��||fSr�)rh�path�basename)r�rrrs    r'r�r�#s+��$��H�d�D�
�7���H�%�%�t�T�1�1r(c��|dS)Nr�r5)rvs r'r�r�'s����7�Nr(c��|dd�dkrA|d}|�d��r"|�d��r
d|dd�zS|Sd|zS)	Nr�)�~r�<�>z{%s}rrOz	%s:%d(%s))�
startswith�endswith)r�rs  r'ruru*sh����!��}�� � ���|���?�?�3���	�D�M�M�#�$6�$6�	��D��2��J�&�&��K��Y�&�&r(c�f�	|\}}}}}|\}}}	}
}||z||z||	z||
zt||��fSr�)�add_callers)�targetr�rwrxryrzr{�t_cc�t_nc�t_tt�t_ct�	t_callerss            r'r�r�;sU��=�$��B��B��G�(.�%�D�$��d�I��t�G�R��W�b��g�r�$�w��)�W�-�-�/�/r(c	�>�	i}|���D]
\}}|||<�|���D]e\}}||vrWt|t��r1td�t|||��D����||<�O||xx|z
cc<�`|||<�f|S)Nc3�&K�|]\}}||zV��
dSr�r5)�.0�i�js   r'�	<genexpr>zadd_callers.<locals>.<genexpr>Ks*����)[�)[�D�A�q�!�a�%�)[�)[�)[�)[�)[�)[r()rtrdr��zip)rr��new_callersrvr�s     r'rrBs���4��K������#�#���f�"��D��������	'�	'���f��;����&�%�(�(�
,�$)�)[�)[�C���TX�HY�<Z�<Z�)[�)[�)[�$[�$[��D�!�!��D�!�!�!�V�+�!�!�!�!� &�K�����r(c�D�	d}|���D]}||z
}�|Sr})r#)r{rxr
s   r'�count_callsr#Ss3��J�	
�B����!�!����
�e����
�Ir(c��d|zS)Nz%8.3fr5)�xs r'r�r�^s���Q�;�r(�__main__c��eZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�ProfileBrowserNc��tj�|��d|_d|_t
j|_|�|�|��dSdS)N�% )	�cmd�CmdrM�promptr[rErFrC�do_read)rJ�profiles  r'rMzProfileBrowser.__init__msU���G���T�"�"�"��D�K��D�J��*�D�K��"����W�%�%�%�%�%�#�"r(c���|���}g}|D]�}	|�t|�����&#t$rYnwxYw	t	|��}|dks|dkrtd|j����i|�|���#t$rYnwxYw|�|����|jrt|j|��|�ntd|j���dS)Nrrz#Fraction argument must be in [0, 1]rQ�No statistics object is loaded.)	�splitr�r>�
ValueErrorr=r`rCr[�getattr)rJ�fnrrK�	processed�term�fracs       r'�genericzProfileBrowser.genericus/���:�:�<�<�D��I��
'�
'����$�$�S��Y�Y�/�/�/���!�����D������ ��;�;�D��a�x�x�4�!�8�8��C�$�+�V�V�V�V� ��$�$�T�*�*�*���!�����D������ � ��&�&�&�&��z�
K�'���
�B�'�'��3�3�3��7�d�k�J�J�J�J��1s'�"?�
A�A�1B�B�
B%�$B%c��td|j���td|j���td|j���td|j���td|j���td|j���dS)NzArguments may be:rQz0* An integer maximum number of entries to print.z:* A decimal fractional number between 0 and 1, controllingz-  what fraction of selected entries to print.z8* A regular expression; only entries with function namesz  that match it are printed.r�r�s r'�generic_helpzProfileBrowser.generic_help�s����%�D�K�8�8�8�8��D�4�;�W�W�W�W��N�UY�U`�a�a�a�a��A���T�T�T�T��L�SW�S^�_�_�_�_��0�t�{�C�C�C�C�C�Cr(c���|jrO	|j�|��nI#t$r&}td|�d|��|j���Yd}~nd}~wwxYwtd|j���dS)NzFailed to load statistics for z: rQr1r)r[rI�OSErrorr`rC)rJr�es   r'�do_addzProfileBrowser.do_add�s����z�
K�`��J�N�N�4�(�(�(�(���`�`�`��E�D�D�D�!�!�L�SW�S^�_�_�_�_�_�_�_�_�_�����`�����7�d�k�J�J�J�J��1s�$�
A�A�Ac�2�td|j���dS)Nz>Add profile info from given file to current statistics object.rQr�r�s r'�help_addzProfileBrowser.help_add�s ���R�Y]�Yd�e�e�e�e�e�er(c�.�|�d|��S)Nr��r9�rJrs  r'�
do_calleeszProfileBrowser.do_callees�����<�<���6�6�6r(c�Z�td|j���|���dS)Nz6Print callees statistics from the current stat object.rQ�r`rCr;r�s r'�help_calleeszProfileBrowser.help_callees��2���J�QU�Q\�]�]�]�]��������r(c�.�|�d|��S)Nr�rCrDs  r'�
do_callerszProfileBrowser.do_callers�rFr(c�Z�td|j���|���dS)Nz6Print callers statistics from the current stat object.rQrHr�s r'�help_callerszProfileBrowser.help_callers�rJr(c�2�td|j���dS)NrPrQrr�rDs  r'�do_EOFzProfileBrowser.do_EOF�s���"�4�;�'�'�'�'��1r(c�2�td|j���dS�NzLeave the profile browser.rQr�r�s r'�help_EOFzProfileBrowser.help_EOF�����.�T�[�A�A�A�A�A�Ar(c��dS)Nrr5rDs  r'�do_quitzProfileBrowser.do_quit�s���1r(c�2�td|j���dSrRr�r�s r'�	help_quitzProfileBrowser.help_quit�rTr(c���|r�	t|��|_np#t$r,}t|jd|j���Yd}~dSd}~wt$r/}t|jjdz||j���Yd}~dSd}~wwxYw|dz|_	nSt|j	��dkr%|j	dd�}|�|��ntd|j���dS)	NrrQ�:r*r����z1No statistics object is current -- cannot reload.r)rr[r=r`rKrCr_rnr)r-rGr.)rJr�errs   r'r.zProfileBrowser.do_read�s���
]��!&�t���D�J�J�������#�(�1�+�D�K�8�8�8�8��F�F�F�F�F����� �����#�-�0�3�6��$�+�N�N�N�N��F�F�F�F�F���������#�T�k�����T�[�!�!�A�%�%��{�3�B�3�'�����T�"�"�"�"��I�PT�P[�\�\�\�\��1s ��
B�!A
�

B�$B�Bc�^�td|j���td|j���dS)Nz+Read in profile data from a specified file.rQz*Without argument, reload the current file.r�r�s r'�	help_readzProfileBrowser.help_read�s4���?�d�k�R�R�R�R��>�T�[�Q�Q�Q�Q�Q�Qr(c�t�|jr|j���ntd|j���dS)Nr1rQr)r[r�r`rCrDs  r'�
do_reversezProfileBrowser.do_reverse�s?���z�
K��
�(�(�*�*�*�*��7�d�k�J�J�J�J��1r(c�2�td|j���dS)Nz/Reverse the sort order of the profiling report.rQr�r�s r'�help_reversezProfileBrowser.help_reverse�s���C�$�+�V�V�V�V�V�Vr(c����|jstd|j���dS|j����|rOt	�fd�|���D����r"|jj|����n[td|j���tj�	��D]&\}}t|�d|d��|j����'dS)Nr1rQc3� �K�|]}|�vV��	dSr�r5)rr%�abbrevss  �r'rz)ProfileBrowser.do_sort.<locals>.<genexpr>�s'�����A�A�q�Q�'�\�A�A�A�A�A�Ar(z/Valid sort keys (unique prefixes are accepted):z -- rr)
r[r`rCr��allr2r�rr�rt)rJrr�r$res    @r'�do_sortzProfileBrowser.do_sort�s�����:�
��7�d�k�J�J�J�J����j�2�2�4�4�G��
J��A�A�A�A�D�J�J�L�L�A�A�A�A�A�
J�%��
�%�t�z�z�|�|�4�4�4��G�d�k�Z�Z�Z�Z�$)�$?�$E�$E�$G�$G�J�J�L�S�%�����U�1�X�X�6�T�[�I�I�I�I�I��1r(c�^�td|j���td|j���dS)Nz.Sort profile data according to specified keys.rQz3(Typing `sort' without arguments lists valid keys.)r�r�s r'�	help_sortzProfileBrowser.help_sort�s4���B���U�U�U�U��G�d�k�Z�Z�Z�Z�Z�Zr(c�4���fd�tjD��S)Nc�>��g|]}|�����|��Sr5)r)r�a�texts  �r'�
<listcomp>z0ProfileBrowser.complete_sort.<locals>.<listcomp>�s*���Q�Q�Q�!�a�l�l�4�>P�>P�Q�A�Q�Q�Qr()rr�)rJrmrKs ` r'�
complete_sortzProfileBrowser.complete_sort�s ���Q�Q�Q�Q�u�:�Q�Q�Q�Qr(c�.�|�d|��S)Nr�rCrDs  r'�do_statszProfileBrowser.do_stats�s���<�<�
�t�4�4�4r(c�Z�td|j���|���dS)Nz.Print statistics from the current stat object.rQrHr�s r'�
help_statszProfileBrowser.help_stats�s0���B���U�U�U�U��������r(c�v�|jr|j���dStd|j���dS)Nr1rQ)r[r�r`rCrDs  r'�do_stripzProfileBrowser.do_strip�sC���z�
K��
�%�%�'�'�'�'�'��7�d�k�J�J�J�J�J�Jr(c�2�td|j���dS)Nz<Strip leading path information from filenames in the report.rQr�r�s r'�
help_stripzProfileBrowser.help_strip�s ���P�W[�Wb�c�c�c�c�c�cr(c�2�td|j���dS)NzShow help for a given command.rQr�r�s r'�	help_helpzProfileBrowser.help_help�s���2���E�E�E�E�E�Er(c��|r|SdSr�r5)rJ�stoprs   r'�postcmdzProfileBrowser.postcmd�s���
����4r(r�)r)r*r+rMr9r;r?rArErIrLrNrPrSrVrXr.r^r`rbrgrirorqrsrurwryr|r5r(r'r(r(ls�������	&�	&�	&�	&�	�	�	�0	D�	D�	D�	�	�	�	f�	f�	f�	7�	7�	7�	 �	 �	 �	7�	7�	7�	 �	 �	 �	�	�	�	B�	B�	B�	�	�	�	B�	B�	B�	�	�	�"	R�	R�	R�	�	�	�	W�	W�	W�	�	�	�	[�	[�	[�	R�	R�	R�	5�	5�	5�	 �	 �	 �	K�	K�	K�
	d�	d�	d�	F�	F�	F�	�	�	�	�	r(r(rr�z*Welcome to the profile statistics browser.rQzGoodbye.)+rErhrrfr��enumrr�	functoolsr�dataclassesr�typingr�__all__r	r
rrr�r�r�rur�rr#r�r)r+�readline�ImportErrorr,r(rG�argv�initprofile�browserr/r?r`rC�cmdloop�KeyboardInterruptr5r(r'�<module>r�si��9�,�
�
�
�	�	�	�	���������	�	�	�	�&�&�&�&�&�&�&�&� � � � � � �!�!�!�!�!�!�������
A�
A�
A��
��g�������������*��t����������������t����.�.�.�.�.�.�.���.�
~7�~7�~7�~7�~7�~7�~7�~7�@��������22�2�2����	'�	'�	'�"/�/�/����"�������z����J�J�J�
��������
�
�
���
����P�P�P�P�P���P�P�P�d�s�3�8�}�}�q����h�q�k�����
� �.��-�-���x����|�	$�	$�G��N�N�7�#�#�#�#�
��:���P�P�P�P�������
��j�w�~�.�.�.�.�.�.���
�
�
����
����I�s%�
C�C�C�A*E>�>F�F

?>