/snap/core18/2979/usr/lib/python3.6/__pycache__
NameSizeModeActions
abc.cpython-36.pyc75150644editdlrm
aifc.cpython-36.pyc259430644editdlrm
antigravity.cpython-36.pyc7790644editdlrm
argparse.cpython-36.pyc604560644editdlrm
ast.cpython-36.pyc117040644editdlrm
asynchat.cpython-36.pyc68150644editdlrm
asyncore.cpython-36.pyc158380644editdlrm
base64.cpython-36.pyc170590644editdlrm
bdb.cpython-36.pyc170330644editdlrm
binhex.cpython-36.pyc120860644editdlrm
bisect.cpython-36.pyc26760644editdlrm
bz2.cpython-36.pyc112820644editdlrm
calendar.cpython-36.pyc258820644editdlrm
cgi.cpython-36.pyc284160644editdlrm
cgitb.cpython-36.pyc100800644editdlrm
chunk.cpython-36.pyc49000644editdlrm
cmd.cpython-36.pyc125750644editdlrm
code.cpython-36.pyc98360644editdlrm
codecs.cpython-36.pyc339000644editdlrm
codeop.cpython-36.pyc62700644editdlrm
colorsys.cpython-36.pyc33110644editdlrm
compileall.cpython-36.pyc82780644editdlrm
configparser.cpython-36.pyc452440644editdlrm
contextlib.cpython-36.pyc111580644editdlrm
copy.cpython-36.pyc70790644editdlrm
copyreg.cpython-36.pyc42440644editdlrm
cProfile.cpython-36.pyc42940644editdlrm
crypt.cpython-36.pyc22420644editdlrm
csv.cpython-36.pyc118550644editdlrm
datetime.cpython-36.pyc545110644editdlrm
decimal.cpython-36.pyc3510644editdlrm
difflib.cpython-36.pyc596420644editdlrm
dis.cpython-36.pyc141810644editdlrm
doctest.cpython-36.pyc755890644editdlrm
dummy_threading.cpython-36.pyc11020644editdlrm
enum.cpython-36.pyc234530644editdlrm
filecmp.cpython-36.pyc83050644editdlrm
fileinput.cpython-36.pyc131520644editdlrm
fnmatch.cpython-36.pyc28740644editdlrm
formatter.cpython-36.pyc175790644editdlrm
fractions.cpython-36.pyc184260644editdlrm
ftplib.cpython-36.pyc283570644editdlrm
functools.cpython-36.pyc240620644editdlrm
genericpath.cpython-36.pyc37260644editdlrm
getopt.cpython-36.pyc62170644editdlrm
getpass.cpython-36.pyc41770644editdlrm
gettext.cpython-36.pyc143060644editdlrm
glob.cpython-36.pyc42590644editdlrm
gzip.cpython-36.pyc162260644editdlrm
hashlib.cpython-36.pyc66920644editdlrm
heapq.cpython-36.pyc142920644editdlrm
hmac.cpython-36.pyc48360644editdlrm
imaplib.cpython-36.pyc421380644editdlrm
imghdr.cpython-36.pyc41500644editdlrm
imp.cpython-36.pyc96960644editdlrm
inspect.cpython-36.pyc797390644editdlrm
io.cpython-36.pyc33870644editdlrm
ipaddress.cpython-36.pyc623860644editdlrm
keyword.cpython-36.pyc17650644editdlrm
linecache.cpython-36.pyc37780644editdlrm
locale.cpython-36.pyc340300644editdlrm
lzma.cpython-36.pyc119920644editdlrm
macpath.cpython-36.pyc56410644editdlrm
macurl2path.cpython-36.pyc18670644editdlrm
mailbox.cpython-36.pyc637520644editdlrm
mailcap.cpython-36.pyc72090644editdlrm
mimetypes.cpython-36.pyc155530644editdlrm
modulefinder.cpython-36.pyc153660644editdlrm
netrc.cpython-36.pyc38360644editdlrm
nntplib.cpython-36.pyc337800644editdlrm
ntpath.cpython-36.pyc131900644editdlrm
nturl2path.cpython-36.pyc14990644editdlrm
numbers.cpython-36.pyc121420644editdlrm
opcode.cpython-36.pyc54130644editdlrm
operator.cpython-36.pyc139130644editdlrm
optparse.cpython-36.pyc480540644editdlrm
os.cpython-36.pyc296280644editdlrm
pathlib.cpython-36.pyc420070644editdlrm
pdb.cpython-36.pyc460940644editdlrm
pickle.cpython-36.pyc426910644editdlrm
pickletools.cpython-36.pyc660200644editdlrm
pipes.cpython-36.pyc78080644editdlrm
pkgutil.cpython-36.pyc162610644editdlrm
platform.cpython-36.pyc291970644editdlrm
plistlib.cpython-36.pyc280550644editdlrm
poplib.cpython-36.pyc133290644editdlrm
posixpath.cpython-36.pyc104560644editdlrm
pprint.cpython-36.pyc158240644editdlrm
profile.cpython-36.pyc139010644editdlrm
pstats.cpython-36.pyc218570644editdlrm
pty.cpython-36.pyc38610644editdlrm
pyclbr.cpython-36.pyc83650644editdlrm
pydoc.cpython-36.pyc837750644editdlrm
py_compile.cpython-36.pyc65440644editdlrm
queue.cpython-36.pyc87550644editdlrm
quopri.cpython-36.pyc57730644editdlrm
random.cpython-36.pyc193300644editdlrm
re.cpython-36.pyc140580644editdlrm
reprlib.cpython-36.pyc54000644editdlrm
rlcompleter.cpython-36.pyc57800644editdlrm
runpy.cpython-36.pyc79820644editdlrm
sched.cpython-36.pyc65640644editdlrm
secrets.cpython-36.pyc21620644editdlrm
selectors.cpython-36.pyc176970644editdlrm
shelve.cpython-36.pyc94580644editdlrm
shlex.cpython-36.pyc69700644editdlrm
shutil.cpython-36.pyc307040644editdlrm
signal.cpython-36.pyc25150644editdlrm
site.cpython-36.pyc165600644editdlrm
sitecustomize.cpython-36.pyc2120644editdlrm
smtpd.cpython-36.pyc266830644editdlrm
smtplib.cpython-36.pyc353400644editdlrm
sndhdr.cpython-36.pyc69130644editdlrm
socket.cpython-36.pyc220130644editdlrm
socketserver.cpython-36.pyc242500644editdlrm
sre_compile.cpython-36.pyc102780644editdlrm
sre_constants.cpython-36.pyc59720644editdlrm
sre_parse.cpython-36.pyc203580644editdlrm
ssl.cpython-36.pyc369390644editdlrm
stat.cpython-36.pyc38510644editdlrm
statistics.cpython-36.pyc181740644editdlrm
string.cpython-36.pyc79640644editdlrm
stringprep.cpython-36.pyc100300644editdlrm
struct.cpython-36.pyc3120644editdlrm
subprocess.cpython-36.pyc354850644editdlrm
sunau.cpython-36.pyc169380644editdlrm
symbol.cpython-36.pyc25170644editdlrm
symtable.cpython-36.pyc104280644editdlrm
sysconfig.cpython-36.pyc159160644editdlrm
tabnanny.cpython-36.pyc69750644editdlrm
tarfile.cpython-36.pyc630850644editdlrm
telnetlib.cpython-36.pyc180970644editdlrm
tempfile.cpython-36.pyc253090644editdlrm
textwrap.cpython-36.pyc136840644editdlrm
this.cpython-36.pyc12650644editdlrm
threading.cpython-36.pyc372340644editdlrm
timeit.cpython-36.pyc116030644editdlrm
token.cpython-36.pyc33200644editdlrm
tokenize.cpython-36.pyc186470644editdlrm
trace.cpython-36.pyc194950644editdlrm
traceback.cpython-36.pyc196460644editdlrm
tracemalloc.cpython-36.pyc172290644editdlrm
tty.cpython-36.pyc10720644editdlrm
turtle.cpython-36.pyc1317510644editdlrm
types.cpython-36.pyc82010644editdlrm
typing.cpython-36.pyc733060644editdlrm
uu.cpython-36.pyc34980644editdlrm
uuid.cpython-36.pyc209180644editdlrm
warnings.cpython-36.pyc132580644editdlrm
wave.cpython-36.pyc178850644editdlrm
weakref.cpython-36.pyc191430644editdlrm
webbrowser.cpython-36.pyc157970644editdlrm
xdrlib.cpython-36.pyc83020644editdlrm
zipapp.cpython-36.pyc55340644editdlrm
zipfile.cpython-36.pyc497280644editdlrm
_bootlocale.cpython-36.pyc9800644editdlrm
_collections_abc.cpython-36.pyc287970644editdlrm
_compat_pickle.cpython-36.pyc65660644editdlrm
_compression.cpython-36.pyc41040644editdlrm
_dummy_thread.cpython-36.pyc48510644editdlrm
_markupbase.cpython-36.pyc79910644editdlrm
_osx_support.cpython-36.pyc96840644editdlrm
_pydecimal.cpython-36.pyc1634020644editdlrm
_pyio.cpython-36.pyc713860644editdlrm
_sitebuiltins.cpython-36.pyc34350644editdlrm
_strptime.cpython-36.pyc159630644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc187790644editdlrm
_threading_local.cpython-36.pyc64250644editdlrm
_weakrefset.cpython-36.pyc78280644editdlrm
__future__.cpython-36.pyc41670644editdlrm
__phello__.foo.cpython-36.pyc1190644editdlrm
Edit: /snap/core18/2979/usr/lib/python3.6/__pycache__/tracemalloc.cpython-36.pyc (17229B)
3 NqiA@sddlmZmZddlmZddlZddlZddlZddl Z ddl Tddl m Z m Z ddZ Gdd d ZGd d d Zd d ZeGdddZeGdddeZddZGdddZGdddeZddZGdddZGdddeZGdddeZGd d!d!Zd"d#ZdS)$)SequenceIterable)total_orderingN)*)_get_object_traceback _get_tracescCszxtd D]l}t|dkr:|dkr:|r.d||fSd||fSt|dksN|dkrj|r^d ||fSd ||fS|d }qWdS)NBKiBMiBGiBTiBdz%+.1f %sz%.1f %s iz%+.0f %sz%.0f %s)rr r r r i()abs)sizeZsignZunitr!/usr/lib/python3.6/tracemalloc.py _format_size s     rc@sDeZdZdZdZddZddZd d Zd d Zd dZ ddZ dS) StatisticzS Statistic difference on memory allocations between two Snapshot instance. tracebackrcountcCs||_||_||_dS)N)rrr)selfrrrrrr__init__%szStatistic.__init__cCst|j|j|jfS)N)hashrrr)rrrr__hash__*szStatistic.__hash__cCs$|j|jko"|j|jko"|j|jkS)N)rrr)rotherrrr__eq__-s  zStatistic.__eq__cCsBd|jt|jd|jf}|jr>|j|j}|dt|d7}|S)Nz%s: size=%s, count=%iFz , average=%s)rrrr)rtextaveragerrr__str__2s   zStatistic.__str__cCsd|j|j|jfS)Nz))rrr)rrrr__repr__<szStatistic.__repr__cCs|j|j|jfS)N)rrr)rrrr _sort_key@szStatistic._sort_keyN)rrr) __name__ __module__ __qualname____doc__ __slots__rrrrr r!rrrrrs rc@sDeZdZdZdZddZd d Zd d Zd dZddZ ddZ 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|jfS)N)rrrr(rr))rrrrrRszStatisticDiff.__hash__cCs<|j|jko:|j|jko:|j|jko:|j|jko:|j|jkS)N)rrr(rr))rrrrrrVs     zStatisticDiff.__eq__cCsPd|jt|jdt|jd|j|jf}|jrL|j|j}|dt|d7}|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)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&rrrrr r!rrrrr'Ds r'cCsg}xp|jD]d\}}|j|d}|dk rPt||j|j|j|j|j|j}nt||j|j|j|j}|j|qWx6|jD]*\}}t|d|j d|j }|j|qW|S)Nr)itemspopr'rrappend) old_group new_group statisticsrstatZpreviousrrr_compare_grouped_statsts  r1c@s\eZdZdZdZddZeddZeddZd d Z d d Z d dZ ddZ ddZ dS)Framez Frame of a traceback. _framecCs ||_dS)N)r3)rframerrrrszFrame.__init__cCs |jdS)Nr)r3)rrrrfilenameszFrame.filenamecCs |jdS)N)r3)rrrrlinenosz Frame.linenocCs |j|jkS)N)r3)rrrrrrsz Frame.__eq__cCs |j|jkS)N)r3)rrrrr__lt__sz Frame.__lt__cCs t|jS)N)rr3)rrrrrszFrame.__hash__cCsd|j|jfS)Nz%s:%s)r5r7)rrrrrsz Frame.__str__cCsd|j|jfS)Nz)r5r7)rrrrr szFrame.__repr__N)r3)r"r#r$r%r&rpropertyr5r7rr8rrr rrrrr2s  r2c@sfeZdZdZdZddZddZddZd d Zd d Z d dZ ddZ ddZ ddZ dddZdS) Tracebackz` Sequence of Frame instances sorted from the most recent frame to the oldest frame. _framescCstj|||_dS)N)rrr;)rframesrrrrs zTraceback.__init__cCs t|jS)N)lenr;)rrrr__len__szTraceback.__len__cCs4t|tr"tdd|j|DSt|j|SdS)Ncss|]}t|VqdS)N)r2).0tracerrr sz(Traceback.__getitem__..) isinstanceslicetupler;r2)rindexrrr __getitem__s zTraceback.__getitem__cCs |j|jkS)N)r3r;)rr4rrr __contains__szTraceback.__contains__cCs t|jS)N)rr;)rrrrrszTraceback.__hash__cCs |j|jkS)N)r;)rrrrrrszTraceback.__eq__cCs |j|jkS)N)r;)rrrrrr8szTraceback.__lt__cCs t|dS)Nr)str)rrrrrszTraceback.__str__cCsdt|fS)Nz)rD)rrrrr szTraceback.__repr__NcCsng}|dk r|dkr|SxP|d|D]@}|jd|j|jftj|j|jj}|r&|jd|q&W|S)Nrz File "%s", line %sz %s)r,r5r7 linecachegetlinestrip)rlimitlinesr4linerrrformatszTraceback.format)r;)N)r"r#r$r%r&rr>rFrGrrr8rr rOrrrrr: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<rrrget_object_tracebacksrQc@s`eZdZdZdZddZeddZeddZed d Z d d Z d dZ ddZ ddZ dS)Tracez" Trace of a memory block. _tracecCs ||_dS)N)rS)rr@rrrrszTrace.__init__cCs |jdS)Nr)rS)rrrrdomainsz Trace.domaincCs |jdS)Nr6)rS)rrrrrsz Trace.sizecCst|jdS)N)r:rS)rrrrrszTrace.tracebackcCs |j|jkS)N)rS)rrrrrrsz Trace.__eq__cCs t|jS)N)rrS)rrrrr szTrace.__hash__cCsd|jt|jdfS)Nz%s: %sF)rrr)rrrrr sz Trace.__str__cCsd|jt|jd|jfS)Nz'F)rTrrr)rrrrr szTrace.__repr__N)rS)r"r#r$r%r&rr9rTrrrrrr rrrrrRs   rRc@s<eZdZddZddZddZddZd d Zd d Zd S)_TracescCstj|||_dS)N)rr_traces)rtracesrrrrs z_Traces.__init__cCs t|jS)N)r=rW)rrrrr>sz_Traces.__len__cCs4t|tr"tdd|j|DSt|j|SdS)Ncss|]}t|VqdS)N)rR)r?r@rrrrA sz&_Traces.__getitem__..)rBrCrDrWrR)rrErrrrFs z_Traces.__getitem__cCs |j|jkS)N)rSrW)rr@rrrrG$sz_Traces.__contains__cCs |j|jkS)N)rW)rrrrrr'sz_Traces.__eq__cCs dt|S)Nz)r=)rrrrr *sz_Traces.__repr__N) r"r#r$rr>rFrGrr rrrrrVs rVcCs&tjj|}|jdr"|dd}|S)Nz.pycr6)ospathnormcaseendswith)r5rrr_normalize_filename.s   r^c@seZdZddZddZdS) BaseFiltercCs ||_dS)N) inclusive)rr`rrrr6szBaseFilter.__init__cCstdS)N)NotImplementedError)rr@rrr_match9szBaseFilter._matchN)r"r#r$rrbrrrrr_5sr_csJeZdZdfdd ZeddZddZd d Zd d Zd dZ Z S)FilterNFcs2tj|||_t||_||_||_||_dS)N)superrr`r^_filename_patternr7 all_framesrT)rr`filename_patternr7rfrT) __class__rrr>s   zFilter.__init__cCs|jS)N)re)rrrrrgGszFilter.filename_patterncCs6t|}tj||jsdS|jdkr(dS||jkSdS)NFT)r^fnmatchrer7)rr5r7rrr_match_frame_implKs  zFilter._match_frame_implcCs|j|||j AS)N)rjr`)rr5r7rrr _match_frameTszFilter._match_framecsHjr,tfdd|Dr"jSj Sn|d\}}j||SdS)Nc3s|]\}}j||VqdS)N)rj)r?r5r7)rrrrAYsz*Filter._match_traceback..r)rfanyr`rk)rrr5r7r)rr_match_tracebackWs    zFilter._match_tracebackcCsD|\}}}|j|}|jdk r@|jr2|o0||jkS|p>||jkS|S)N)rmrTr`)rr@rTrrZresrrrrbbs   z Filter._match)NFN) r"r#r$rr9rgrjrkrmrb __classcell__rr)rhrrc=s    rccs0eZdZfddZeddZddZZS) DomainFiltercstj|||_dS)N)rdr_domain)rr`rT)rhrrrns zDomainFilter.__init__cCs|jS)N)rp)rrrrrTrszDomainFilter.domaincCs|\}}}||jk|j AS)N)rTr`)rr@rTrrrrrrbvs zDomainFilter._match)r"r#r$rr9rTrbrnrr)rhrroms  roc@sXeZdZdZddZddZeddZdd Zd d Z d d Z dddZ dddZ dS)SnapshotzB Snapshot of traces of memory blocks allocated by Python. cCst||_||_dS)N)rVrXtraceback_limit)rrXrrrrrrs zSnapshot.__init__c Cs*t|d}tj||tjWdQRXdS)z1 Write the snapshot into a file. wbN)openpickledumpZHIGHEST_PROTOCOL)rr5fprrrrvs z Snapshot.dumpc Cs t|d }tj|SQRXdS)z. Load a snapshot from a file. rbN)rtruload)r5rwrrrrys z Snapshot.loadcs@|rtfdd|DsdS|r.Fc3s|]}|j VqdS)N)rb)r?rz)r@rrrAsT)rl)rinclude_filtersexclude_filtersr@r)r@r _filter_traces    zSnapshot._filter_tracecst|tstdt|j|rnggx(|D] }|jrDj|q.j|q.WfddjjD}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?r@)r|r{rrr sz*Snapshot.filter_traces..) rBr TypeErrortyper"r`r,rXrWcopyrqrr)rfiltersrzZ new_tracesr)r|r{rr filter_tracess    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|| <YqFXqFWnx|jjD]}|\}}}x|D]} y || } WnFtk r|dkrd| f} n| ddff} t| } | || <YnXy(|| } | j|7_| jd7_Wn&tk rt| |d|| <YnXq0WqW|S) Nrr5r7zunknown key_type: %rz/cumulative mode cannot by used with key type %rr6r)rr5r7)r7r5) ValueErrorrXrWKeyErrorr:rrr) rkey_type cumulativeZstatsZ tracebacksr@rTrZtrace_tracebackrr<r0r4rrr _group_bysX       "zSnapshot._group_byFcCs,|j||}t|j}|jdtjd|S)zd Group statistics by key_type. Return a sorted list of Statistic instances. T)reversekey)rlistvaluessortrr!)rrrZgroupedr/rrrr/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)rr)rr1rr'r!)rZ old_snapshotrrr.r-r/rrr compare_tos    zSnapshot.compare_toN)F)F) r"r#r$r%rrv staticmethodryr}rrr/rrrrrrq{s  3 rqcCs$tstdt}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_limitrq)rXrrrrr take_snapshots r) collectionsrr functoolsrrirIos.pathrZruZ _tracemallocrrrrr'r1r2r:rQrRrVr^r_rcrorqrrrrrs0 &0# 5%0