403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.6/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.6/__pycache__/tracemalloc.cpython-36.opt-1.pyc
3

H1�aA�@sddlmZmZddlmZddlZddlZddlZddl	Z	ddl
Tddl
mZmZdd�Z
Gdd	�d	�ZGd
d�d�Zdd
�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_tracescCszxtd
D]l}t|�dkr:|dkr:|r.d||fSd||fSt|�dksN|dkrj|r^d||fSd||fS|d
}qWdS)N�B�KiB�MiB�GiB�TiB�dz%+.1f %sz%.1f %s�
iz%+.0f %sz%.0f %s)rr	r
rri()�abs)�size�signZunit�r�!/usr/lib/python3.6/tracemalloc.py�_format_size
s
rc@sDeZdZdZdZdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�	StatisticzS
    Statistic difference on memory allocations between two Snapshot instance.
    �	tracebackr�countcCs||_||_||_dS)N)rrr)�selfrrrrrr�__init__%szStatistic.__init__cCst|j|j|jf�S)N)�hashrrr)rrrr�__hash__*szStatistic.__hash__cCs$|j|jko"|j|jko"|j|jkS)N)rrr)r�otherrrr�__eq__-szStatistic.__eq__cCsBd|jt|jd�|jf}|jr>|j|j}|dt|d�7}|S)Nz%s: size=%s, count=%iFz, average=%s)rrrr)r�text�averagerrr�__str__2s

zStatistic.__str__cCsd|j|j|jfS)Nz)<Statistic traceback=%r size=%i count=%i>)rrr)rrrr�__repr__<szStatistic.__repr__cCs|j|j|jfS)N)rrr)rrrr�	_sort_key@szStatistic._sort_keyN)rrr)�__name__�
__module__�__qualname__�__doc__�	__slots__rrrr r!r"rrrrrs
rc@sDeZdZdZdZdd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dS)�
StatisticDiffzd
    Statistic difference on memory allocations between an old and a new
    Snapshot instance.
    rr�	size_diffr�
count_diffcCs"||_||_||_||_||_dS)N)rrr)rr*)rrrr)rr*rrrrKs
zStatisticDiff.__init__cCst|j|j|j|j|jf�S)N)rrrr)rr*)rrrrrRszStatisticDiff.__hash__cCs<|j|jko:|j|jko:|j|jko:|j|jko:|j|jkS)N)rrr)rr*)rrrrrrVs
zStatisticDiff.__eq__cCsPd|jt|jd�t|jd�|j|jf}|jrL|j|j}|dt|d�7}|S)Nz %s: size=%s (%s), count=%i (%+i)FTz, average=%s)rrrr)rr*)rrrrrrr ]s


zStatisticDiff.__str__cCsd|j|j|j|j|jfS)Nz9<StatisticDiff traceback=%r size=%i (%+i) count=%i (%+i)>)rrr)rr*)rrrrr!iszStatisticDiff.__repr__cCs t|j�|jt|j�|j|jfS)N)rr)rr*rr)rrrrr"nszStatisticDiff._sort_keyN)rrr)rr*)r#r$r%r&r'rrrr r!r"rrrrr(Dsr(cCs�g}xp|j�D]d\}}|j|d�}|dk	rPt||j|j|j|j|j|j�}nt||j|j|j|j�}|j|�qWx6|j�D]*\}}t|d|jd|j�}|j|�q�W|S)Nr)�items�popr(rr�append)�	old_group�	new_group�
statisticsr�statZpreviousrrr�_compare_grouped_statstsr2c@s\eZdZdZdZdd�Zedd��Zedd��Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS)�Framez
    Frame of a traceback.
    �_framecCs
||_dS)N)r4)r�framerrrr�szFrame.__init__cCs
|jdS)Nr)r4)rrrr�filename�szFrame.filenamecCs
|jdS)N�)r4)rrrr�lineno�szFrame.linenocCs|j|jkS)N)r4)rrrrrr�szFrame.__eq__cCs|j|jkS)N)r4)rrrrr�__lt__�szFrame.__lt__cCs
t|j�S)N)rr4)rrrrr�szFrame.__hash__cCsd|j|jfS)Nz%s:%s)r6r8)rrrrr �sz
Frame.__str__cCsd|j|jfS)Nz<Frame filename=%r lineno=%r>)r6r8)rrrrr!�szFrame.__repr__N)r4)r#r$r%r&r'r�propertyr6r8rr9rr r!rrrrr3�sr3c@sfeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
ddd�ZdS)�	Tracebackz`
    Sequence of Frame instances sorted from the most recent frame
    to the oldest frame.
    �_framescCstj|�||_dS)N)rrr<)r�framesrrrr�s
zTraceback.__init__cCs
t|j�S)N)�lenr<)rrrr�__len__�szTraceback.__len__cCs4t|t�r"tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdS)N)r3)�.0�tracerrr�	<genexpr>�sz(Traceback.__getitem__.<locals>.<genexpr>)�
isinstance�slice�tupler<r3)r�indexrrr�__getitem__�s
zTraceback.__getitem__cCs|j|jkS)N)r4r<)rr5rrr�__contains__�szTraceback.__contains__cCs
t|j�S)N)rr<)rrrrr�szTraceback.__hash__cCs|j|jkS)N)r<)rrrrrr�szTraceback.__eq__cCs|j|jkS)N)r<)rrrrrr9�szTraceback.__lt__cCst|d�S)Nr)�str)rrrrr �szTraceback.__str__cCsdt|�fS)Nz<Traceback %r>)rE)rrrrr!�szTraceback.__repr__NcCsng}|dk	r|dkr|SxP|d|�D]@}|jd|j|jf�tj|j|j�j�}|r&|jd|�q&W|S)Nrz  File "%s", line %sz    %s)r-r6r8�	linecache�getline�strip)r�limit�linesr5�linerrr�format�szTraceback.format)r<)N)r#r$r%r&r'rr?rGrHrrr9r r!rPrrrrr;�sr;cCs t|�}|dk	rt|�SdSdS)z�
    Get the traceback where the Python object *obj* was allocated.
    Return a Traceback instance.

    Return None if the tracemalloc module is not tracing memory allocations or
    did not trace the allocation of the object.
    N)rr;)�objr=rrr�get_object_traceback�srRc@s`eZdZdZdZdd�Zedd��Zedd��Zed	d
��Z	dd�Z
d
d�Zdd�Zdd�Z
dS)�Tracez"
    Trace of a memory block.
    �_tracecCs
||_dS)N)rT)rrArrrr�szTrace.__init__cCs
|jdS)Nr)rT)rrrr�domain�szTrace.domaincCs
|jdS)Nr7)rT)rrrrr�sz
Trace.sizecCst|jd�S)N�)r;rT)rrrrrszTrace.tracebackcCs|j|jkS)N)rT)rrrrrrszTrace.__eq__cCs
t|j�S)N)rrT)rrrrr
szTrace.__hash__cCsd|jt|jd�fS)Nz%s: %sF)rrr)rrrrr 
sz
Trace.__str__cCsd|jt|jd�|jfS)Nz'<Trace domain=%s size=%s, traceback=%r>F)rUrrr)rrrrr!szTrace.__repr__N)rT)r#r$r%r&r'rr:rUrrrrr r!rrrrrS�srSc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�_TracescCstj|�||_dS)N)rr�_traces)r�tracesrrrrs
z_Traces.__init__cCs
t|j�S)N)r>rX)rrrrr?sz_Traces.__len__cCs4t|t�r"tdd�|j|D��St|j|�SdS)Ncss|]}t|�VqdS)N)rS)r@rArrrrB sz&_Traces.__getitem__.<locals>.<genexpr>)rCrDrErXrS)rrFrrrrGs
z_Traces.__getitem__cCs|j|jkS)N)rTrX)rrArrrrH$sz_Traces.__contains__cCs|j|jkS)N)rX)rrrrrr'sz_Traces.__eq__cCsdt|�S)Nz<Traces len=%s>)r>)rrrrr!*sz_Traces.__repr__N)	r#r$r%rr?rGrHrr!rrrrrWsrWcCs&tjj|�}|jd�r"|dd�}|S)Nz.pycr7���)�os�path�normcase�endswith)r6rrr�_normalize_filename.s
r_c@seZdZdd�Zdd�ZdS)�
BaseFiltercCs
||_dS)N)�	inclusive)rrarrrr6szBaseFilter.__init__cCst�dS)N)�NotImplementedError)rrArrr�_match9szBaseFilter._matchN)r#r$r%rrcrrrrr`5sr`csJeZdZd�fdd�	Zedd��Zdd�Zd	d
�Zdd�Zd
d�Z	�Z
S)�FilterNFcs2t�j|�||_t|�|_||_||_||_dS)N)�superrrar_�_filename_patternr8�
all_framesrU)rra�filename_patternr8rgrU)�	__class__rrr>s
zFilter.__init__cCs|jS)N)rf)rrrrrhGszFilter.filename_patterncCs6t|�}tj||j�sdS|jdkr(dS||jkSdS)NFT)r_�fnmatchrfr8)rr6r8rrr�_match_frame_implKs
zFilter._match_frame_implcCs|j||�|jAS)N)rkra)rr6r8rrr�_match_frameTszFilter._match_framecsH�jr,t�fdd�|D��r"�jS�jSn|d\}}�j||�SdS)Nc3s|]\}}�j||�VqdS)N)rk)r@r6r8)rrrrBYsz*Filter._match_traceback.<locals>.<genexpr>r)rg�anyrarl)rrr6r8r)rr�_match_tracebackWs

zFilter._match_tracebackcCsD|\}}}|j|�}|jdk	r@|jr2|o0||jkS|p>||jkS|S)N)rnrUra)rrArUrr�resrrrrcbs


z
Filter._match)NFN)r#r$r%rr:rhrkrlrnrc�
__classcell__rr)rirrd=s	rdcs0eZdZ�fdd�Zedd��Zdd�Z�ZS)�DomainFiltercst�j|�||_dS)N)rer�_domain)rrarU)rirrrnszDomainFilter.__init__cCs|jS)N)rr)rrrrrUrszDomainFilter.domaincCs|\}}}||jk|jAS)N)rUra)rrArUrrrrrrcvs
zDomainFilter._match)r#r$r%rr:rUrcrprr)rirrqmsrqc@sXeZdZdZdd�Zdd�Zedd��Zdd	�Zd
d�Z	dd
�Z
ddd�Zddd�ZdS)�SnapshotzB
    Snapshot of traces of memory blocks allocated by Python.
    cCst|�|_||_dS)N)rWrY�traceback_limit)rrYrtrrrr�s
zSnapshot.__init__cCs*t|d��}tj||tj�WdQRXdS)z1
        Write the snapshot into a file.
        �wbN)�open�pickle�dumpZHIGHEST_PROTOCOL)rr6�fprrrrx�sz
Snapshot.dumpc	Cs t|d��}tj|�SQRXdS)z.
        Load a snapshot from a file.
        �rbN)rvrw�load)r6ryrrrr{�sz
Snapshot.loadcs@|rt�fdd�|D��sdS|r<t�fdd�|D��r<dSdS)Nc3s|]}|j��VqdS)N)rc)r@�trace_filter)rArrrB�sz)Snapshot._filter_trace.<locals>.<genexpr>Fc3s|]}|j��VqdS)N)rc)r@r|)rArrrB�sT)rm)r�include_filters�exclude_filtersrAr)rAr�
_filter_trace�s

zSnapshot._filter_tracecs�t|t�stdt|�j��|rng�g�x(|D] }|jrD�j|�q.�j|�q.W���fdd��jjD�}n�jjj	�}t
|�j�S)z�
        Create a new Snapshot instance with a filtered traces sequence, filters
        is a list of Filter or DomainFilter instances.  If filters is an empty
        list, return a new Snapshot instance with a copy of the traces.
        z)filters must be a list of filters, not %scsg|]}�j��|�r|�qSr)r)r@rA)r~r}rrr�
<listcomp>�sz*Snapshot.filter_traces.<locals>.<listcomp>)rCr�	TypeError�typer#rar-rYrX�copyrsrt)r�filtersr|Z
new_tracesr)r~r}rr�
filter_traces�s

zSnapshot.filter_tracesc
Cs�|dkrtd|f��|r.|d	kr.td|��i}i}|�sx�|jjD]�}|\}}}y||}	WnZtk
r�|dkr~|}
n(|dkr�|dd�}
n|dddff}
t|
�}	|	||<YnXy(||	}|j|7_|jd7_WqFtk
�r
t|	|d�||	<YqFXqFWn�x�|jjD]�}|\}}}x�|D]�}y||}	WnFtk
�r�|dk�rd|f}
n|ddff}
t|
�}	|	||<YnXy(||	}|j|7_|jd7_Wn&tk
�r�t|	|d�||	<YnX�q0W�qW|S)
Nrr6r8zunknown key_type: %rz/cumulative mode cannot by used with key type %rr7r)rr6r8)r8r6)�
ValueErrorrYrX�KeyErrorr;rrr)
r�key_type�
cumulativeZstatsZ
tracebacksrArUrZtrace_tracebackrr=r1r5rrr�	_group_by�sX



"zSnapshot._group_byFcCs,|j||�}t|j��}|jdtjd�|S)zd
        Group statistics by key_type. Return a sorted list of Statistic
        instances.
        T)�reverse�key)r��list�values�sortrr")rr�r�Zgroupedr0rrrr0�szSnapshot.statisticscCs6|j||�}|j||�}t||�}|jdtjd�|S)z�
        Compute the differences with an old snapshot old_snapshot. Get
        statistics as a sorted list of StatisticDiff instances, grouped by
        group_by.
        T)r�r�)r�r2r�r(r")rZold_snapshotr�r�r/r.r0rrr�
compare_to�s

zSnapshot.compare_toN)F)F)
r#r$r%r&rrx�staticmethodr{rr�r�r0r�rrrrrs{s3

rscCs$t�std��t�}t�}t||�S)zI
    Take a snapshot of traces of memory blocks allocated by Python.
    zLthe tracemalloc module must be tracing memory allocations to take a snapshot)Z
is_tracing�RuntimeErrorrZget_traceback_limitrs)rYrtrrr�
take_snapshots
r�)�collectionsrr�	functoolsrrjrJZos.pathr[rwZ_tracemallocrrrrr(r2r3r;rRrSrWr_r`rdrqrsr�rrrr�<module>s0&0#5%0	

Youez - 2016 - github.com/yon3zu
LinuXploit