AlkantarClanX12

Your IP : 18.222.20.30


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/tracemalloc.cpython-312.opt-2.pyc

�

�Q�fF��\�ddlmZmZddlmZddlZddlZddlZddl	Z	ddl
�ddl
mZmZd�Z
Gd�d�ZGd	�d
�Zd�ZeGd�d
��ZeGd�de��Zd�ZGd�d�ZGd�de�Zd�ZGd�d�ZGd�de�ZGd�de�ZGd�d�Zd�Zy)�)�Sequence�Iterable)�total_orderingN)�*)�_get_object_traceback�_get_tracesc��dD]U}t|�dkr|dk7r|r	d||fzcSd||fzcSt|�dks|dk(r|r	d||fzcSd	||fzcS|d
z}�Wy)N)�B�KiB�MiB�GiB�TiB�dr
z%+.1f %sz%.1f %si(rz%+.0f %sz%.0f %si)�abs)�size�sign�units   �2/opt/alt/python312/lib64/python3.12/tracemalloc.py�_format_sizer
sz��1���t�9�s�?�t�s�{��!�T�4�L�0�0� �D�$�<�/�/��t�9�y� �D�E�M��!�T�4�L�0�0� �D�$�<�/�/�����2�c�6�eZdZ	dZd�Zd�Zd�Zd�Zd�Zd�Z	y)	�	Statistic��	tracebackr�countc�.�||_||_||_y�Nr)�selfrrrs    r�__init__zStatistic.__init__%s��"�����	���
rc�Z�t|j|j|jf�Sr)�hashrrr�rs r�__hash__zStatistic.__hash__*s ���T�^�^�T�Y�Y��
�
�;�<�<rc���t|t�stS|j|jk(xr4|j|jk(xr|j
|j
k(Sr)�
isinstancer�NotImplementedrrr�r�others  r�__eq__zStatistic.__eq__-sQ���%��+�!�!����%�/�/�1�.��I�I����+�.��J�J�%�+�+�-�	/rc���d|jt|jd�|jfz}|jr+|j|jz}|dt|d�zz
}|S)Nz%s: size=%s, count=%iF�, average=%s)rrrr�r�text�averages   r�__str__zStatistic.__str__4sc��'��N�N� ����E�2��J�J� � ���:�:��i�i�$�*�*�,�G��N�\�'�5�%A�A�A�D��rc�N�d|j|j|jfzS)Nz)<Statistic traceback=%r size=%i count=%i>rr"s r�__repr__zStatistic.__repr__>s%��;��>�>�4�9�9�d�j�j�9�:�	;rc�H�|j|j|jfSr)rrrr"s r�	_sort_keyzStatistic._sort_keyBs���	�	�4�:�:�t�~�~�6�6rN�
�__name__�
__module__�__qualname__�	__slots__rr#r)r/r1r3�rrrrs,���/�I��
=�/��;�7rrc�6�eZdZ	dZd�Zd�Zd�Zd�Zd�Zd�Z	y)	�
StatisticDiff�rr�	size_diffr�
count_diffc�J�||_||_||_||_||_yrr<)rrrr=rr>s      rrzStatisticDiff.__init__Ms%��"�����	�"�����
�$��rc��t|j|j|j|j|j
f�Sr)r!rrr=rr>r"s rr#zStatisticDiff.__hash__Ts3���T�^�^�T�Y�Y�����Z�Z����2�3�	3rc�8�t|t�stS|j|jk(xrj|j|jk(xrO|j
|j
k(xr4|j|jk(xr|j|jk(Sr)r%r;r&rrr=rr>r's  rr)zStatisticDiff.__eq__Xs����%��/�!�!����%�/�/�1�8��I�I����+�8��N�N�e�o�o�5�8��J�J�%�+�+�-�8��O�O�u�'7�'7�7�		9rc��d|jt|jd�t|jd�|j|j
fz}|jr+|j|jz}|dt|d�zz
}|S)Nz %s: size=%s (%s), count=%i (%+i)FTr+)rrrr=rr>r,s   rr/zStatisticDiff.__str__asx��2��>�>���	�	�5�1������5��:�:��?�?�	$�$���:�:��i�i�$�*�*�,�G��N�\�'�5�%A�A�A�D��rc�z�d|j|j|j|j|jfzS)Nz9<StatisticDiff traceback=%r size=%i (%+i) count=%i (%+i)>r<r"s rr1zStatisticDiff.__repr__ms4��K��>�>�4�9�9�d�n�n��:�:�t���0�0�	1rc��t|j�|jt|j�|j|j
fSr)rr=rr>rrr"s rr3zStatisticDiff._sort_keyrs7���D�N�N�#�T�Y�Y��D�O�O�$�d�j�j���� �	 rNr4r9rrr;r;Fs-���J�I�%�3�9�
�1�
 rr;c	�2�g}|j�D]�\}}|j|d�}|�Rt||j|j|jz
|j|j|jz
�}n7t||j|j|j|j�}|j|���|j�D];\}}t|d|jd|j�}|j|��=|S�Nr)�items�popr;rr�append)�	old_group�	new_group�
statisticsr�stat�previouss      r�_compare_grouped_statsrOxs����J�$�?�?�,��	�4��=�=��D�1���� ��!%���D�I�I��
�
�,E�!%���T�Z�Z�(�.�.�-H�J�D�!��!%���D�I�I�!%���T�Z�Z�9�D�	���$��-�%�?�?�,��	�4��Y��D�I�I�:�q�4�:�:�+�F�����$��-��rc�V�eZdZ	dZd�Zed��Zed��Zd�Zd�Z	d�Z
d�Zd	�Zy
)�Frame��_framec��||_yrrR�r�frames  rrzFrame.__init__�s	����rc� �|jdSrFrRr"s r�filenamezFrame.filename�����{�{�1�~�rc� �|jdS�N�rRr"s r�linenozFrame.lineno�rYrc�`�t|t�stS|j|jk(Sr�r%rQr&rSr's  rr)zFrame.__eq__��%���%��'�!�!����u�|�|�+�,rc�`�t|t�stS|j|jkSrr_r's  r�__lt__zFrame.__lt__�s%���%��'�!�!����e�l�l�*�+rc�,�t|j�Sr)r!rSr"s rr#zFrame.__hash__�����D�K�K� � rc�8�|j�d|j��S)N�:�rXr]r"s rr/z
Frame.__str__�s���-�-����5�5rc�<�d|j�d|j�d�S)Nz<Frame filename=z lineno=�>rgr"s rr1zFrame.__repr__�s��26�-�-����M�MrN)
r5r6r7r8r�propertyrXr]r)rbr#r/r1r9rrrQrQ�sU����I����������-�
,�
!�6�NrrQc�b�eZdZ	dZdd�Zed��Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zdd
�Zy)�	Traceback)�_frames�
_total_nframeNc�n�tj|�tt|��|_||_yr)rr�tuple�reversedrmrn)r�frames�total_nframes   rrzTraceback.__init__�s+�����$��
�X�f�-�.���)��rc��|jSr)rnr"s rrszTraceback.total_nframe�s���!�!�!rc�,�t|j�Sr)�lenrmr"s r�__len__zTraceback.__len__�����4�<�<� � rc��t|t�rtd�|j|D��St	|j|�S)Nc3�2K�|]}t|����y�wr)rQ��.0�traces  r�	<genexpr>z(Traceback.__getitem__.<locals>.<genexpr>������G�3F�%��u��3F���)r%�slicerprmrQ�r�indexs  r�__getitem__zTraceback.__getitem__��:���e�U�#��G�4�<�<��3F�G�G�G�����e�,�-�-rc�2�|j|jvSr)rSrmrUs  r�__contains__zTraceback.__contains__�����|�|�t�|�|�+�+rc�,�t|j�Sr)r!rmr"s rr#zTraceback.__hash__�s���D�L�L�!�!rc�`�t|t�stS|j|jk(Sr�r%rlr&rmr's  rr)zTraceback.__eq__�s%���%��+�!�!�����
�
�-�.rc�`�t|t�stS|j|jkSrr�r's  rrbzTraceback.__lt__�s%���%��+�!�!����u�}�}�,�-rc��t|d�SrF)�strr"s rr/zTraceback.__str__�s���4��7�|�rc�n�dt|���}|j�|dz
}|S|d|j�d�z
}|S)Nz<Traceback riz total_nframe=)rprnrs)r�ss  rr1zTraceback.__repr__�sO���%��+��'�����%�
��H�A���
�>�$�"3�"3�!4�A�6�6�A��rc�R�g}|�|dkDr||d}n|d|}n|}|rt|�}|D]|}|jd|j�d|j���t	j
|j|j�j
�}|s�i|jd|z��~|S)Nrz  File "z", line z    %s)rqrIrXr]�	linecache�getline�strip)r�limit�most_recent_first�lines�frame_slicerV�lines       r�formatzTraceback.format�s��������q�y�"�E�6�7�m��"�6�E�l���K��"�;�/�K� �E��L�L�!�N�N�E�L�L�:�
;��$�$�U�^�^�U�\�\�B�H�H�J�D�����X��_�-�!��rr)NF)r5r6r7r8rrjrsrwr�r�r#r)rbr/r1r�r9rrrlrl�sT���-�I�*��"��"�!�.�,�"�/�
.�
��rrlc�6�	t|�}|�t|�Syr)rrl)�objrrs  r�get_object_tracebackr�s'���#�3�
'�F�
���� � �rc�`�eZdZ	dZd�Zed��Zed��Zed��Zd�Z	d�Z
d�Zd	�Zy
)�Trace��_tracec��||_yrr��rr}s  rrzTrace.__init__s����rc� �|jdSrFr�r"s r�domainzTrace.domainrYrc� �|jdSr[r�r"s rrz
Trace.sizerYrc�,�t|jdd�S)N�)rlr�r"s rrzTrace.traceback#s���$�+�+�a�b�/�*�*rc�`�t|t�stS|j|jk(Sr)r%r�r&r�r's  rr)zTrace.__eq__'r`rc�,�t|j�Sr)r!r�r"s rr#zTrace.__hash__,rdrc�L�|j�dt|jd���S)Nz: F)rrrr"s rr/z
Trace.__str__/s���>�>�<��	�	�5�+I�J�Jrc�j�d|j�dt|jd��d|j�d�S)Nz<Trace domain=z size=Fz, traceback=ri)r�rrrr"s rr1zTrace.__repr__2s(���;�;��T�Y�Y�� >����P�	QrN)
r5r6r7r8rrjr�rrr)r#r/r1r9rrr�r�se����I��
���������+��+�-�
!�K�Qrr�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�_Tracesc�<�tj|�||_yr)rr�_traces)r�tracess  rrz_Traces.__init__8s�����$����rc�,�t|j�Sr)rvr�r"s rrwz_Traces.__len__=rxrc��t|t�rtd�|j|D��St	|j|�S)Nc3�2K�|]}t|����y�wr)r�r{s  rr~z&_Traces.__getitem__.<locals>.<genexpr>Brr�)r%r�rpr�r�r�s  rr�z_Traces.__getitem__@r�rc�2�|j|jvSr)r�r�r�s  rr�z_Traces.__contains__Fr�rc�`�t|t�stS|j|jk(Sr)r%r�r&r�r's  rr)z_Traces.__eq__Is%���%��)�!�!�����
�
�-�.rc��dt|�zS)Nz<Traces len=%s>)rvr"s rr1z_Traces.__repr__Ns�� �3�t�9�,�,rN)	r5r6r7rrwr�r�r)r1r9rrr�r�7s ���
!�.�,�/�
-rr�c�p�tjj|�}|jd�r|dd}|S)Nz.pyc���)�os�path�normcase�endswith)rXs r�_normalize_filenamer�Rs4���w�w����)�H����� ��C�R�=���Orc��eZdZd�Zd�Zy)�
BaseFilterc��||_yr)�	inclusive)rr�s  rrzBaseFilter.__init__Zs	��"��rc��t�r)�NotImplementedErrorr�s  r�_matchzBaseFilter._match]s��!�!rN)r5r6r7rr�r9rrr�r�Ys��#�"rr�c�J��eZdZ	d�fd�	Zed��Zd�Zd�Zd�Zd�Z	�xZ
S)�Filterc�|��t�|�|�||_t|�|_||_||_||_yr)�superrr�r��_filename_patternr]�
all_framesr�)rr��filename_patternr]r�r��	__class__s      �rrzFilter.__init__bs:���
����#�"���!4�5E�!F������$�����rc��|jSr)r�r"s rr�zFilter.filename_patternks���%�%�%rc��t|�}tj||j�sy|j�y||jk(S)NFT)r��fnmatchr�r]�rrXr]s   r�_match_frame_implzFilter._match_frame_implos?��&�x�0�����x��)?�)?�@���;�;����d�k�k�)�*rc�B�|j||�|jzSr)r�r�r�s   r�_match_framezFilter._match_framexs!���%�%�h��7�t�~�~�;M�N�Nrc����jr-t�fd�|D��r�jS�jS|d\}}�j||�S)Nc3�H�K�|]\}}�j||����y�wr)r�)r|rXr]rs   �rr~z*Filter._match_traceback.<locals>.<genexpr>}s+�����6�+4�'�x���)�)�(�F�;�+4�s�"r)r��anyr�r�)rrrXr]s`   r�_match_tracebackzFilter._match_traceback{sW����?�?��6�+4�6�6��~�~�%� �N�N�*�+�(��|��H�f��$�$�X�v�6�6rc��|\}}}}|j|�}|j�2|jr|xr||jk(S|xs||jk7S|Sr)r�r�r�)rr}r�rrrs�ress       rr�z
Filter._match�s^��05�-���i���#�#�I�.���;�;�"��~�~��6��$�+�+� 5�6��5�v����4�5��
r)NFN)r5r6r7rrjr�r�r�r�r��
__classcell__�r�s@rr�r�as4���7;���&��&�+�O�	7�rr�c�4��eZdZ�fd�Zed��Zd�Z�xZS)�DomainFilterc�2��t�|�|�||_yr)r�r�_domain)rr�r�r�s   �rrzDomainFilter.__init__�s���
����#���rc��|jSr)r�r"s rr�zDomainFilter.domain�s���|�|�rc�J�|\}}}}||jk(|jzSr)r�r�)rr}r�rrrss      rr�zDomainFilter._match�s+��05�-���i���$�+�+�%�d�n�n�*<�=�=r)r5r6r7rrjr�r�r�r�s@rr�r��s!��������>rr�c�L�eZdZ	d�Zd�Zed��Zd�Zd�Zd�Z	d
d�Z
d
d�Zy	)�Snapshotc�2�t|�|_||_yr)r�r��traceback_limit)rr�r�s   rrzSnapshot.__init__�s���f�o���.��rc��	t|d�5}tj||tj�ddd�y#1swYyxYw)N�wb)�open�pickle�dump�HIGHEST_PROTOCOL)rrX�fps   rr�z
Snapshot.dump�s7��	��(�D�
!�R��K�K��b�&�"9�"9�:�"�
!�
!�s	�&=�Ac�r�	t|d�5}tj|�cddd�S#1swYyxYw)N�rb)r�r��load)rXr�s  rr�z
Snapshot.load�s1��	��(�D�
!�R��;�;�r�?�	#�	#�
!�
!�s�-�6c�b��|rt�fd�|D��sy|rt�fd�|D��ryy)Nc3�@�K�|]}|j�����y�wr�r��r|�trace_filterr}s  �rr~z)Snapshot._filter_trace.<locals>.<genexpr>�s$�����<�+:�<�$�*�*�5�1�+:�s�Fc3�B�K�|]}|j�����y�wrr�r�s  �rr~z)Snapshot._filter_trace.<locals>.<genexpr>�s'�����8�'6�|�$�*�*�5�1�1�'6�s�T)r�)r�include_filters�exclude_filtersr}s   `r�
_filter_tracezSnapshot._filter_trace�s<�����<�+:�<�<����8�'6�8�8��rc���	t|t�s!tdt|�jz��|rqg}g}|D]1}|j
r|j
|��!|j
|��3|jjD�cgc]}|j|||�r|��}}n$|jjj�}t||j�Scc}w)Nz)filters must be a list of filters, not %s)
r%r�	TypeError�typer5r�rIr�r�r��copyr�r�)r�filtersr�r�r�r}�
new_tracess       r�
filter_traceszSnapshot.filter_traces�s���	�
�'�8�,��G�"�7�m�4�4�5�6�
6�� �O� �O� '���)�)�#�*�*�<�8�#�*�*�<�8�	!(�
.2�[�[�-@�-@�8�-@�E�!�/�/��0?�05�7� �-@�J�8�
���,�,�1�1�3�J��
�D�$8�$8�9�9��
8s�C c�&�|dvrtd|����|r|dvrtd|z��i}i}|sZ|jjD]?}|\}}}}		||}
	||
}|xj
|z
c_|xjdz
c_�A|S|jjD]F}|\}}}}	|D]8}
	||
}
	||
}|xj
|z
c_|xjdz
c_�:�H|S#t$r1|dk(r|}n|dk(r|dd}n|dddff}t	|�}
|
||<Y��wxYw#t$rt|
|d�||
<Y��wxYw#t$r$|dk(r|
f}n|
ddff}t	|�}
|
||
<Y��wxYw#t$rt|
|d�||
<Y��wxYw)	N)rrXr]zunknown key_type: )r]rXz/cumulative mode cannot by used with key type %rrr]r\r)�
ValueErrorr�r��KeyErrorrlrrr)r�key_type�
cumulative�stats�
tracebacksr}r�r�trace_tracebackrsrrrrMrVs              r�	_group_byzSnapshot._group_by�s���>�>��x�A�B�B��(�*@�@��0�2:�;�<�
<����
�����,�,��>C�;���o�|�
<� *�?� ;�I�E� ��+�D��I�I��%�I��J�J�!�O�J�!-�N��%���,�,��>C�;���o�|�,�E�6�$.�u�$5�	�I�$�Y�/���	�	�T�)�	��
�
�a��
�-�-�$���G �<��;�.�!0��!�X�-�!0��!�!4��#2�1�#5�a�#8�!�"<�!>�� )�&� 1�I�2;�J��/�<�� �E�'0��D�!�'D�E�)�$�E��$�6�#�x�/�&+�X�F�',�Q�x��m�%5�F�$-�f�$5�	�,5�
�5�)�
6��$�I�+4�Y��a�+H��i�(�I�sH�C(�/D%�-E�3/E4�(7D"�!D"�%E�E�*E1�0E1�4F�Fc��	|j||�}t|j��}|jdtj
��|S�NT)�reverse�key)r	�list�values�sortrr3)rrr�groupedrLs     rrLzSnapshot.statisticssF��	��.�.��:�6���'�.�.�*�+�
�����)�*=�*=��>��rc��	|j||�}|j||�}t||�}|jdtj��|Sr)r	rOrr;r3)r�old_snapshotrrrKrJrLs       r�
compare_tozSnapshot.compare_tosS��	�
�N�N�8�Z�8�	� �*�*�8�Z�@�	�+�I�y�A�
�����-�*A�*A��B��rN)F)r5r6r7rr��staticmethodr�r�rr	rLrr9rrr�r��s?���/�;��#��#�	�:�21�f�
rr�c�n�	t�std��t�}t�}t	||�S)NzLthe tracemalloc module must be tracing memory allocations to take a snapshot)�
is_tracing�RuntimeErrorr�get_traceback_limitr�)r�r�s  r�
take_snapshotr's<����<��<�=�	=�
�]�F�)�+�O��F�O�,�,r)�collections.abcrr�	functoolsrr�r��os.pathr�r��_tracemallocrrrrr;rOrQrlr�r�r�r�r�r�r�r�rr9rr�<module>rs���.�$����
��;��"%7�%7�P/ �/ �d�(�#N�#N��#N�L�J��J��J�Z�$Q�$Q�N-�h�-�6�"�"�-�Z�-�`>�:�>�E�E�P	-r