uawdijnntqw1x1x1
IP : 18.191.67.90
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
pgsql
/
..
/
python3.8
/
unittest
/
.
/
.
/
..
/
__pycache__
/
tracemalloc.cpython-38.opt-2.pyc
/
/
U e5d�B�@sddlmZmZddlmZddlZddlZddlZddl Z ddl Tddl mZmZdd�Z Gdd �d �ZGd d�d�Zdd �ZeGdd�d��ZeGdd�de��Zdd�ZGdd�d�ZGdd�de�Zdd�ZGdd�d�ZGdd�de�ZGdd�de�ZGd d!�d!�Zd"d#�ZdS)$�)�Sequence�Iterable)�total_orderingN)�*)�_get_object_traceback�_get_tracescCs�dD]|}t|�dkr@|dkr@|r0d||fSd||fSt|�dksT|dkrx|rhd||fSd ||fS|d }qdS)N)�BZKiBZMiBZGiB�TiB�drz%+.1f %sz%.1f %si(r z%+.0f %sz%.0f %si)�abs)�sizeZsignZunit�r �#/usr/lib64/python3.8/tracemalloc.py�_format_size src@s@eZdZdZdd�Zdd�Zdd�Zdd �Zd d�Zdd �Z dS)� Statistic�� tracebackr�countcCs||_||_||_dS�Nr)�selfrrrr r r�__init__%szStatistic.__init__cCst|j|j|jf�Sr)�hashrrr�rr r r�__hash__*szStatistic.__hash__cCs$|j|jko"|j|jko"|j|jkSrr�r�otherr r r�__eq__-s � �zStatistic.__eq__cCsBd|jt|jd�|jf}|jr>|j|j}|dt|d�7}|S)Nz%s: size=%s, count=%iF�, average=%s)rrrr�r�textZaverager r r�__str__2s ��zStatistic.__str__cCsd|j|j|jfS)Nz)<Statistic traceback=%r size=%i count=%i>rrr r r�__repr__<s�zStatistic.__repr__cCs|j|j|jfSr)rrrrr r r� _sort_key@szStatistic._sort_keyN� �__name__� __module__�__qualname__� __slots__rrrr r!r"r r r rrs rc@s@eZdZdZdd�Zdd�Zdd�Zdd �Zd d�Zdd �Z dS)� StatisticDiff�rr� size_diffr� count_diffcCs"||_||_||_||_||_dSrr))rrrr*rr+r r rrKs zStatisticDiff.__init__cCst|j|j|j|j|jf�Sr)rrrr*rr+rr r rrRs�zStatisticDiff.__hash__cCs<|j|jko:|j|jko:|j|jko:|j|jko:|j|jkSrr)rr r rrVs � � � �zStatisticDiff.__eq__cCsPd|jt|jd�t|jd�|j|jf}|jrL|j|j}|dt|d�7}|S)Nz %s: size=%s (%s), count=%i (%+i)FTr)rrrr*rr+rr r rr ]s ��zStatisticDiff.__str__cCsd|j|j|j|j|jfS)Nz9<StatisticDiff traceback=%r size=%i (%+i) count=%i (%+i)>r)rr r rr!is��zStatisticDiff.__repr__cCs t|j�|jt|j�|j|jfSr)rr*rr+rrrr r rr"ns �zStatisticDiff._sort_keyNr#r r r rr(Dsr(cCs�g}|��D]d\}}|�|d�}|dk rNt||j|j|j|j|j|j�}nt||j|j|j|j�}|�|�q|��D]*\}}t|d|jd|j�}|�|�qz|S�Nr)�items�popr(rr�append)� old_group� new_group� statisticsr�statZpreviousr r r�_compare_grouped_statsts* ��r4c@sXeZdZdZdd�Zedd��Zedd��Zdd �Zd d�Z dd �Z dd�Zdd�ZdS)�Frame��_framecCs ||_dSrr6�r�framer r rr�szFrame.__init__cCs |jdSr,r6rr r r�filename�szFrame.filenamecCs |jdS�N�r6rr r r�lineno�szFrame.linenocCs|j|jkSrr6rr r rr�szFrame.__eq__cCs|j|jkSrr6rr r r�__lt__�szFrame.__lt__cCs t|j�Sr)rr7rr r rr�szFrame.__hash__cCsd|j|jfS)Nz%s:%s�r:r=rr r rr �sz Frame.__str__cCsd|j|jfS)Nz<Frame filename=%r lineno=%r>r?rr r rr!�szFrame.__repr__N) r$r%r&r'r�propertyr:r=rr>rr r!r r r rr5�s r5c@sbeZdZdZdd�Zdd�Zdd�Zdd �Zd d�Zdd �Z dd�Z dd�Zdd�Zddd�Z dS)� Traceback��_framescCst�|�tt|��|_dSr)rr�tuple�reversedrC)r�framesr r rr�s zTraceback.__init__cCs t|j�Sr)�lenrCrr r r�__len__�szTraceback.__len__cCs4t|t�r"tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdSr)r5��.0�tracer r r� <genexpr>�sz(Traceback.__getitem__.<locals>.<genexpr>)� isinstance�slicerDrCr5�r�indexr r r�__getitem__�s zTraceback.__getitem__cCs|j|jkSr)r7rCr8r r r�__contains__�szTraceback.__contains__cCs t|j�Sr)rrCrr r rr�szTraceback.__hash__cCs|j|jkSrrBrr r rr�szTraceback.__eq__cCs|j|jkSrrBrr r rr>�szTraceback.__lt__cCst|d�Sr,)�strrr r rr �szTraceback.__str__cCsdt|�fS)Nz<Traceback %r>)rDrr r rr!�szTraceback.__repr__NFcCs�g}|dk r2|dkr$||d�}q6|d|�}n|}|rBt|�}|D]@}|�d|j|jf�t�|j|j���}|rF|�d|�qF|S)Nrz File "%s", line %sz %s)rEr/r:r=� linecache�getline�strip)r�limitZmost_recent_first�linesZframe_slicer9�liner r r�format�s �zTraceback.format)NF)r$r%r&r'rrHrQrRrrr>r r!rZr r r rrA�srAcCs t|�}|dk rt|�SdSdSr)rrA)�objrFr r r�get_object_traceback�sr\c@s\eZdZdZdd�Zedd��Zedd��Zedd ��Zd d�Z dd �Z dd�Zdd�ZdS)�Trace��_tracecCs ||_dSrr^�rrKr r rrszTrace.__init__cCs |jdSr,r^rr r r�domainszTrace.domaincCs |jdSr;r^rr r rr sz Trace.sizecCst|jd�S)N�)rAr_rr r rr szTrace.tracebackcCs|j|jkSrr^rr r rrszTrace.__eq__cCs t|j�Sr)rr_rr r rrszTrace.__hash__cCsd|jt|jd�fS)Nz%s: %sF)rrrrr r rr sz Trace.__str__cCsd|jt|jd�|jfS)Nz'<Trace domain=%s size=%s, traceback=%r>F)rarrrrr r rr!s�zTrace.__repr__N) r$r%r&r'rr@rarrrrr r!r r r rr]�s r]c@s<eZdZdd�Zdd�Zdd�Zdd�Zd d �Zdd�Zd S)�_TracescCst�|�||_dSr)rr�_traces)r�tracesr r rr s z_Traces.__init__cCs t|j�Sr)rGrdrr r rrH%sz_Traces.__len__cCs4t|t�r"tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdSr)r]rIr r rrL*sz&_Traces.__getitem__.<locals>.<genexpr>)rMrNrDrdr]rOr r rrQ(s z_Traces.__getitem__cCs|j|jkSr)r_rdr`r r rrR.sz_Traces.__contains__cCs|j|jkSr)rdrr r rr1sz_Traces.__eq__cCsdt|�S)Nz<Traces len=%s>)rGrr r rr!4sz_Traces.__repr__N) r$r%r&rrHrQrRrr!r r r rrcsrccCs&tj�|�}|�d�r"|dd�}|S)Nz.pyc���)�os�path�normcase�endswith)r:r r r�_normalize_filename8s rkc@seZdZdd�Zdd�ZdS)� BaseFiltercCs ||_dSr)� inclusive)rrmr r rr@szBaseFilter.__init__cCst�dSr)�NotImplementedErrorr`r r r�_matchCszBaseFilter._matchN)r$r%r&rror r r rrl?srlcsJeZdZd�fdd� Zedd��Zdd�Zd d �Zdd�Zd d�Z �Z S)�FilterNFcs2t��|�||_t|�|_||_||_||_dSr)�superrrmrk�_filename_patternr=� all_framesra)rrm�filename_patternr=rsra�� __class__r rrHs zFilter.__init__cCs|jSr)rrrr r rrtQszFilter.filename_patterncCs6t|�}t�||j�sdS|jdkr(dS||jkSdS)NFT)rk�fnmatchrrr=�rr:r=r r r�_match_frame_implUs zFilter._match_frame_implcCs|�||�|jASr)ryrmrxr r r�_match_frame^szFilter._match_framecsH�jr,t�fdd�|D��r"�jS�jSn|d\}}��||�SdS)Nc3s|]\}}��||�VqdSr)ry)rJr:r=rr rrLcs�z*Filter._match_traceback.<locals>.<genexpr>r)rs�anyrmrz)rrr:r=r rr�_match_tracebackas� zFilter._match_tracebackcCsD|\}}}|�|�}|jdk r@|jr2|o0||jkS|p>||jkS|Sr)r|rarm)rrKrarr�resr r rrols z Filter._match)NFN)r$r%r&rr@rtryrzr|ro� __classcell__r r rurrpGs� rpcs0eZdZ�fdd�Zedd��Zdd�Z�ZS)�DomainFiltercst��|�||_dSr)rqr�_domain)rrmrarur rrxszDomainFilter.__init__cCs|jSr)r�rr r rra|szDomainFilter.domaincCs|\}}}||jk|jASr)rarm)rrKrarrr r rro�s zDomainFilter._match)r$r%r&rr@raror~r r rurrws rc@sTeZdZdd�Zdd�Zedd��Zdd�Zd d �Zdd�Z ddd�Z ddd�ZdS)�SnapshotcCst|�|_||_dSr)rcre�traceback_limit)rrer�r r rr�s zSnapshot.__init__c Cs*t|d��}t�||tj�W5QRXdS)N�wb)�open�pickle�dumpZHIGHEST_PROTOCOL)rr:�fpr r rr��sz Snapshot.dumpc Cs,t|d��}t�|�W5QR�SQRXdS)N�rb)r�r��load)r:r�r r rr��sz Snapshot.loadcs@|rt�fdd�|D��sdS|r<t�fdd�|D��r<dSdS)Nc3s|]}|���VqdSr�ro�rJ�trace_filter�rKr rrL�s�z)Snapshot._filter_trace.<locals>.<genexpr>Fc3s|]}|���VqdSrr�r�r�r rrL�s�T)r{)r�include_filters�exclude_filtersrKr r�r� _filter_trace�s��zSnapshot._filter_tracecs�t|t�stdt|�j��|rjg�g�|D] }|jrB��|�q,��|�q,���fdd��jjD�}n�jj� �}t |�j�S)Nz)filters must be a list of filters, not %scsg|]}����|�r|�qSr )r�rI�r�r�rr r� <listcomp>�s��z*Snapshot.filter_traces.<locals>.<listcomp>)rMr� TypeError�typer$rmr/rerd�copyr�r�)r�filtersr�Z new_tracesr r�r� filter_traces�s �zSnapshot.filter_tracesc Cs�|dkrtd|f��|r.|dkr.td|��i}i}|�s|jjD]�}|\}}}z||} WnZtk r�|dkr||} n(|dkr�|dd�} n|dddff} t| �} | ||<YnXz(|| }|j|7_|jd7_WqDtk �rt| |d�|| <YqDXqDn�|jjD]�}|\}}}|D]�}z||} WnFtk �r~|dk�r\|f} n|ddff} t| �} | ||<YnXz(|| }|j|7_|jd7_Wn&tk �r�t| |d�|| <YnX�q(�q|S) N)rr:r=zunknown key_type: %r)r=r:z/cumulative mode cannot by used with key type %rrr=r<r)� ValueErrorrerd�KeyErrorrArrr) r�key_type� cumulativeZstatsZ tracebacksrKrarZtrace_tracebackrrFr3r9r r r� _group_by�sZ� zSnapshot._group_byFcCs,|�||�}t|���}|jdtjd�|S�NT)�reverse�key)r��list�values�sortrr")rr�r�Zgroupedr2r r rr2�szSnapshot.statisticscCs6|�||�}|�||�}t||�}|jdtjd�|Sr�)r�r4r�r(r")rZold_snapshotr�r�r1r0r2r r r� compare_tos zSnapshot.compare_toN)F)F)r$r%r&rr��staticmethodr�r�r�r�r2r�r r r rr��s 3 r�cCs$t�std��t�}t�}t||�S)NzLthe tracemalloc module must be tracing memory allocations to take a snapshot)� is_tracing�RuntimeErrorrZget_traceback_limitr�)rer�r r r� take_snapshot s r�)Zcollections.abcrr� functoolsrrwrTZos.pathrgr�Z_tracemallocrrrrr(r4r5rAr\r]rcrkrlrprr�r�r r r r�<module>s2&0"?%0
/home/./../lib64/pgsql/../python3.8/unittest/././../__pycache__/tracemalloc.cpython-38.opt-2.pyc