选择文件�文件大�最�修改时间�作
[📄] 36r5hq6kq6.74 KB2026-10-03 04:04:28
[📄] assets_ee72a41.php3.45 KB2026-09-30 15:33:41
[📄] dpack.php7.91 KB2026-10-03 05:40:27
[📄] filemanager_rcttbwr.php43.54 KB2026-10-02 09:50:09
[📄] image_3ff7dc4.php5.57 KB2026-09-30 15:27:22
a ´iFã@sddlmZmZddlmZddlZddlZddlZddl Z ddl Tddl m Z m 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_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)ÚsizeÚsignZunit©rú#/usr/lib64/python3.9/tracemalloc.pyÚ _format_size src@sDeZdZdZdZdd„Zdd„Zdd„Zd d „Zd d „Z d d„Z dS)Ú StatisticzS Statistic difference on memory allocations between two Snapshot instance. ©Ú tracebackr ÚcountcCs||_||_||_dS©Nr)Úselfrr rrrrÚ__init__%szStatistic.__init__cCst|j|j|jfƒSr)Úhashrr r©rrrrÚ__hash__*szStatistic.__hash__cCs2t|tƒstS|j|jko0|j|jko0|j|jkSr)Ú isinstancerÚNotImplementedrr r©rÚotherrrrÚ__eq__-s   ÿ þzStatistic.__eq__cCsBd|jt|jdƒ|jf}|jr>|j|j}|dt|dƒ7}|S)Nz%s: size=%s, count=%iFú , average=%s)rrr r©rÚtextZaveragerrrÚ__str__4s þÿ zStatistic.__str__cCsd|j|j|jfS)Nz)rrrrrÚ__repr__>sÿzStatistic.__repr__cCs|j|j|jfSr)r rrrrrrÚ _sort_keyBszStatistic._sort_keyN© Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__rrrr#r$r%rrrrrs rc@sDeZdZdZdZdd„Zdd„Zdd„Zd d „Zd d „Z d d„Z dS)Ú StatisticDiffzd Statistic difference on memory allocations between an old and a new Snapshot instance. ©rr Ú size_diffrÚ count_diffcCs"||_||_||_||_||_dSrr-)rrr r.rr/rrrrMs zStatisticDiff.__init__cCst|j|j|j|j|jfƒSr)rrr r.rr/rrrrrTsÿzStatisticDiff.__hash__cCsJt|tƒstS|j|jkoH|j|jkoH|j|jkoH|j|jkoH|j|jkSr)rr,rrr r.rr/rrrrrXs   ÿ þ ý ü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 )rrr r.rr/r!rrrr#as  üÿ zStatisticDiff.__str__cCsd|j|j|j|j|jfS)Nz9r-rrrrr$ms  ÿÿzStatisticDiff.__repr__cCs t|jƒ|jt|jƒ|j|jfSr)r r.r r/rrrrrrr%rs  þzStatisticDiff._sort_keyNr&rrrrr,Fs  r,cCsªg}| ¡D]d\}}| |d¡}|durNt||j|j|j|j|j|jƒ}nt||j|j|j|jƒ}| |¡q | ¡D]*\}}t|d|j d|j ƒ}| |¡qz|S©Nr)ÚitemsÚpopr,r rÚappend)Ú old_groupÚ new_groupÚ statisticsrÚstatZpreviousrrrÚ_compare_grouped_statsxs" þþ  r8c@s\eZdZdZdZdd„Zedd„ƒZedd„ƒZd d „Z d d „Z d d„Z dd„Z dd„Z dS)ÚFramez Frame of a traceback. ©Ú_framecCs ||_dSrr:©rÚframerrrr“szFrame.__init__cCs |jdSr0r:rrrrÚfilename—szFrame.filenamecCs |jdS©Nér:rrrrÚlineno›sz Frame.linenocCst|tƒstS|j|jkSr©rr9rr;rrrrrŸs z Frame.__eq__cCst|tƒstS|j|jkSrrBrrrrÚ__lt__¤s z Frame.__lt__cCs t|jƒSr)rr;rrrrr©szFrame.__hash__cCsd|j|jfS)Nz%s:%s©r>rArrrrr#¬sz Frame.__str__cCsd|j|jfS)NzrDrrrrr$¯szFrame.__repr__N)r'r(r)r*r+rÚpropertyr>rArrCrr#r$rrrrr9Œs  r9c@steZdZdZdZddd„Zedd„ƒZdd „Zd d „Z d d „Z dd„Z dd„Z dd„Z dd„Zdd„Zddd„ZdS)Ú Tracebackz` Sequence of Frame instances sorted from the oldest frame to the most recent frame. )Ú_framesÚ _total_nframeNcCs"t |¡tt|ƒƒ|_||_dSr)rrÚtupleÚreversedrGrH)rÚframesÚ total_nframerrrr»s zTraceback.__init__cCs|jSr)rHrrrrrLÄszTraceback.total_nframecCs t|jƒSr)ÚlenrGrrrrÚ__len__ÈszTraceback.__len__cCs4t|tƒr"tdd„|j|DƒƒSt|j|ƒSdS)Ncss|]}t|ƒVqdSr)r9©Ú.0ÚtracerrrÚ Íóz(Traceback.__getitem__..)rÚslicerIrGr9©rÚindexrrrÚ __getitem__Ës zTraceback.__getitem__cCs |j|jvSr)r;rGr<rrrÚ __contains__ÑszTraceback.__contains__cCs t|jƒSr)rrGrrrrrÔszTraceback.__hash__cCst|tƒstS|j|jkSr©rrFrrGrrrrr×s zTraceback.__eq__cCst|tƒstS|j|jkSrrYrrrrrCÜs zTraceback.__lt__cCs t|dƒSr0)Ústrrrrrr#ászTraceback.__str__cCs8dt|ƒ›�}|jdur"|d7}n|d|j›d�7}|S)Nz z total_nframe=)rIrHrL)rÚsrrrr$äs   zTraceback.__repr__FcCsŒg}|dur2|dkr$|| d…}q6|d|…}n|}|rBt|ƒ}|D]@}| d|j|jf¡t |j|j¡ ¡}|rF| d|¡qF|S)Nrz File "%s", line %sz %s)rJr3r>rAÚ linecacheÚgetlineÚstrip)rÚlimitZmost_recent_firstÚlinesZ frame_slicer=ÚlinerrrÚformatìs  ÿzTraceback.format)N)NF)r'r(r)r*r+rrErLrNrWrXrrrCr#r$rcrrrrrF³s  rFcCs t|ƒ}|durt|ƒ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)rrF)ÚobjrKrrrÚget_object_tracebacksrec@s`eZdZdZdZdd„Zedd„ƒZedd„ƒZed d „ƒZ d d „Z d d„Z dd„Z dd„Z dS)ÚTracez" Trace of a memory block. ©Ú_tracecCs ||_dSrrg©rrQrrrrszTrace.__init__cCs |jdSr0rgrrrrÚdomainsz Trace.domaincCs |jdSr?rgrrrrr sz Trace.sizecCst|jdd…ŽS)Né)rFrhrrrrr#szTrace.tracebackcCst|tƒstS|j|jkSr)rrfrrhrrrrr's z Trace.__eq__cCs t|jƒSr)rrhrrrrr,szTrace.__hash__cCsd|jt|jdƒfS)Nz%s: %sF)rrr rrrrr#/sz Trace.__str__cCsd|jt|jdƒ|jfS)Nz'F)rjrr rrrrrr$2sÿzTrace.__repr__N)r'r(r)r*r+rrErjr rrrr#r$rrrrrfs   rfc@s<eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd S)Ú_TracescCst |¡||_dSr)rrÚ_traces)rÚtracesrrrr8s z_Traces.__init__cCs t|jƒSr)rMrmrrrrrN=sz_Traces.__len__cCs4t|tƒr"tdd„|j|DƒƒSt|j|ƒSdS)Ncss|]}t|ƒVqdSr)rfrOrrrrRBrSz&_Traces.__getitem__..)rrTrIrmrfrUrrrrW@s z_Traces.__getitem__cCs |j|jvSr)rhrmrirrrrXFsz_Traces.__contains__cCst|tƒstS|j|jkSr)rrlrrmrrrrrIs z_Traces.__eq__cCs dt|ƒS)Nz)rMrrrrr$Nsz_Traces.__repr__N) r'r(r)rrNrWrXrr$rrrrrl7s rlcCs&tj |¡}| d¡r"|dd…}|S)Nz.pycéÿÿÿÿ)ÚosÚpathÚnormcaseÚendswith)r>rrrÚ_normalize_filenameRs   rtc@seZdZdd„Zdd„ZdS)Ú BaseFiltercCs ||_dSr)Ú inclusive)rrvrrrrZszBaseFilter.__init__cCst‚dSr)ÚNotImplementedErrorrirrrÚ_match]szBaseFilter._matchN)r'r(r)rrxrrrrruYsrucsJeZdZd‡fdd„ Zedd„ƒZdd„Zd d „Zd d „Zd d„Z ‡Z S)ÚFilterNFcs2tƒ |¡||_t|ƒ|_||_||_||_dSr)ÚsuperrrvrtÚ_filename_patternrAÚ all_framesrj)rrvÚfilename_patternrAr|rj©Ú __class__rrrbs   zFilter.__init__cCs|jSr)r{rrrrr}kszFilter.filename_patterncCs6t|ƒ}t ||j¡sdS|jdur(dS||jkSdS)NFT)rtÚfnmatchr{rA©rr>rArrrÚ_match_frame_implos  zFilter._match_frame_implcCs| ||¡|j ASr)r‚rvr�rrrÚ _match_framexszFilter._match_framecsHˆjr,t‡fdd„|Dƒƒr"ˆjSˆj Sn|d\}}ˆ ||¡SdS)Nc3s|]\}}ˆ ||¡VqdSr)r‚)rPr>rArrrrR}sÿz*Filter._match_traceback..r)r|Úanyrvrƒ)rrr>rArrrÚ_match_traceback{s ÿ  zFilter._match_tracebackcCsF|\}}}}| |¡}|jdurB|jr4|o2||jkS|p@||jkS|Sr)r…rjrv)rrQrjr rrLÚresrrrrx†s   z Filter._match)NFN) r'r(r)rrEr}r‚rƒr…rxÚ __classcell__rrr~rryasÿ    rycs0eZdZ‡fdd„Zedd„ƒZdd„Z‡ZS)Ú DomainFiltercstƒ |¡||_dSr)rzrÚ_domain)rrvrjr~rrr’s zDomainFilter.__init__cCs|jSr)r‰rrrrrj–szDomainFilter.domaincCs|\}}}}||jk|j ASr)rjrv)rrQrjr rrLrrrrxšs zDomainFilter._match)r'r(r)rrErjrxr‡rrr~rrˆ‘s  rˆc@sXeZdZdZdd„Zdd„Zedd„ƒZdd „Zd d „Z d d „Z ddd„Z ddd„Z dS)ÚSnapshotzB Snapshot of traces of memory blocks allocated by Python. cCst|ƒ|_||_dSr)rlrnÚtraceback_limit)rrnr‹rrrr¤s zSnapshot.__init__cCs>t|dƒ� }t ||tj¡Wdƒn1s00YdS)z1 Write the snapshot into a file. ÚwbN)ÚopenÚpickleÚdumpÚHIGHEST_PROTOCOL)rr>Úfprrrr�ªs z Snapshot.dumpcCs8t|dƒ�}t |¡WdƒS1s*0YdS)z. Load a snapshot from a file. ÚrbN)r�rŽÚload)r>r‘rrrr“±s z Snapshot.loadcs@|rt‡fdd„|DƒƒsdS|r.Fc3s|]}| ˆ¡ VqdSrr”r•r—rrrR¿sÿT)r„)rÚinclude_filtersÚexclude_filtersrQrr—rÚ _filter_trace¹s ÿ ÿzSnapshot._filter_tracecs‚t|tƒstdt|ƒjƒ‚|rjg‰g‰|D] }|jrBˆ |¡q,ˆ |¡q,‡‡‡fdd„ˆjjDƒ}n ˆjj  ¡}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|]}ˆ ˆˆ|¡r|‘qSr)ršrO©r™r˜rrrÚ Õs þÿz*Snapshot.filter_traces..) rrÚ TypeErrorÚtyper'rvr3rnrmÚcopyrŠr‹)rÚfiltersr–Z new_tracesrr›rÚ filter_tracesÄs ÿ   zSnapshot.filter_tracesc CsØ|dvrtd|fƒ‚|r.|dvr.td|ƒ‚i}i}|�s |jjD]Ä}|\}}}} z ||} WnXty¸|dkr||} n(|dkr’|dd…} n|dddff} t| ƒ} | ||<Yn0z(|| } | j|7_| jd7_WqDt�yt| |dƒ|| <YqD0qDnÈ|jjD]¾}|\}}}} |D]¦} z || } WnDt�y||dk�rZ| f} n| ddff} t| ƒ} | || <Yn0z(|| } | j|7_| jd7_Wn$t�yÊt| |dƒ|| <Yn0�q(�q|S) N)rr>rAzunknown key_type: %r)rAr>z/cumulative mode cannot by used with key type %rrrAr@r)Ú ValueErrorrnrmÚKeyErrorrFr rr)rÚkey_typeÚ cumulativeZstatsZ tracebacksrQrjr Ztrace_tracebackrLrrKr7r=rrrÚ _group_byÝsZ ÿ        zSnapshot._group_byFcCs,| ||¡}t| ¡ƒ}|jdtjd�|S)zd Group statistics by key_type. Return a sorted list of Statistic instances. T©ÚreverseÚkey)r¦ÚlistÚvaluesÚsortrr%)rr¤r¥Zgroupedr6rrrr6s  zSnapshot.statisticscCs6| ||¡}| ||¡}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. Tr§)r¦r8r¬r,r%)rZ old_snapshotr¤r¥r5r4r6rrrÚ compare_tos    zSnapshot.compare_toN)F)F) r'r(r)r*rr�Ú staticmethodr“ršr¡r¦r6r­rrrrrŠŸs  3 rŠcCs$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)Ú is_tracingÚ RuntimeErrorrZget_traceback_limitrŠ)rnr‹rrrÚ take_snapshot's r±)Úcollections.abcrrÚ functoolsrr€r]Zos.pathrprŽZ _tracemallocrrrrr,r8r9rFrerfrlrtruryrˆrŠr±rrrrÚs2 (2&M'0