/snap/core20/2866/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc413420644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc134590644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2866/usr/lib/python3.8/__pycache__/pstats.cpython-38.pyc (22066B)
U ʦij@sdZddlZddlZddlZddlZddlZddlmZddlm Z ddgZ Gddde eZ GdddZ Gd d d Zd d Zd dZddZddZddZddZddZedkrddlZz ddlZWnek rYnXGdddejZeejdkrejdZndZzPeeZejddD]Z e!e q0e"dej#de$e"d ej#dWne%k r~YnXdS)!z3Class for printing reports on profiled python code.N)Enum) cmp_to_keyStatsSortKeyc@s8eZdZdZdZdZdZdZdZdZ dZ d Z d d Z d S) r)callsncalls) cumulativecumtime)filenamemodulelinenamenflpcallsstdname)timetottimecGs@|d}t||}||_|ddD]}||j|<q&||_|SNr)str__new___value__value2member_map_Z _all_values)clsvaluesvalueobjZ other_valuer/usr/lib/python3.8/pstats.pyr-s  zSortKey.__new__N) __name__ __module__ __qualname__ZCALLSZ CUMULATIVEZFILENAMEZLINENAMEZNFLZPCALLSZSTDNAMEZTIMErrrrrr"sc@seZdZdZddddZddZdd Zd d Zd d ZddZ dddddddddddddd Z ddZ ddZ ddZ d d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd7d1d2Zd3d4Zd5d6ZdS)8raThis class is used for creating reports from data generated by the Profile class. It is a "friend" of that class, and imports data either by direct access to members of Profile class, or by reading in a dictionary that was emitted (via marshal) from the Profile class. The big change from the previous Profiler (in terms of raw functionality) is that an "add()" method has been provided to combine Stats from several distinct profile runs. Both the constructor and the add() method now take arbitrarily many file names as arguments. All the print methods now take an argument that indicates how many lines to print. If the arg is a floating point number between 0 and 1.0, then it is taken as a decimal percentage of the available lines to be printed (e.g., .1 means print 10% of all available lines). If it is an integer, it is taken to mean the number of lines of data that you wish to have printed. The sort_stats() method now processes some additional options (i.e., in addition to the old -1, 0, 1, or 2 that are respectively interpreted as 'stdname', 'calls', 'time', and 'cumulative'). It takes either an arbitrary number of quoted strings or SortKey enum to select the sort order. For example sort_stats('time', 'name') or sort_stats(SortKey.TIME, SortKey.NAME) sorts on the major key of 'internal function time', and on the minor key of 'the name of the function'. Look at the two tables in sort_stats() and get_sort_arg_defs(self) for more examples. All methods return self, so you can string together commands like: Stats('foo', 'goo').strip_dirs().sort_stats('calls'). print_stats(5).print_callers(5) N)streamcGsF|ptj|_t|sd}n|d}|dd}|||j|dSr)sysstdoutr#leninitadd)selfr#argsargrrr__init__Ys   zStats.__init__cCsd|_g|_d|_d|_d|_d|_d|_t|_i|_ i|_ | |z | Wn8t k rtd|jrx|jdnd|jdYnXdS)NrzInvalid timing data %sfile) all_calleesfilesfcn_listtotal_tt total_calls prim_calls max_name_lenset top_levelstats sort_arg_dict load_statsget_top_level_stats Exceptionprintr#)r)r+rrrr'cs(  z Stats.initc Cs|dkri|_dSt|trxt|d}t||_W5QRXz"t|}t |j d|}Wn YnX|g|_ n t |dr| |j|_i|_|jstd|j|fdS)Nrbz create_statsz.Cannot create or construct a %r object from %r)r: isinstanceropenmarshalloadosstatrctimest_mtimer2hasattrrA TypeError __class__)r)r+fZ file_statsrrrr<vs*     zStats.load_statscCs|jD]p\}\}}}}}|j|7_|j|7_|j|7_d|krZ|j|tt||j kr tt||_ q dS)N)ZjprofilerZprofiler) r:itemsr5r6r4r9r(r&func_std_stringr7)r)funcccncttctcallersrrrr=s zStats.get_top_level_statscGs|s|St|D]}t|t|kr,t|}|j|j7_|j|j7_|j|j7_|j|j7_|jD]}|j|qr|j |j kr|j |_ d|_ |j D]<\}}||j kr|j |}nddddif}t |||j |<qq|SNr)reversedtyperr2r5r6r4r9r(r7r3r:rNadd_func_stats)r)arg_listitemrPrGZ old_func_statrrrr(s(     z Stats.addc Cs(t|d}t|j|W5QRXdS)z:Write the profile data to a file we know how to load back.wbN)rCrDdumpr:)r)r rMrrr dump_statss zStats.dump_stats)))rr-z call count)))r-zcumulative time))rz file name))rz line number))rz function name))rdr`rbzname/file/line)))rr-zprimitive call count)))rz standard name)))r-z internal time) rrr rr r r r rrrrrcCst|jsni|_}i}|jD]>\}}|}|r|s4q||krFd||<q|||<|dd}q*q|D] }||=qb|jS)z)Expand all abbreviations that are unique.rNr-)r;sort_arg_dict_defaultrN)r)dictZbad_listwordtupZfragmentrrrget_sort_arg_defss  zStats.get_sort_arg_defscGs\|sd|_|St|dkrBt|dtrBddddd|dg}n:t|dkr||ddD] }t|t|dkrZtd qZ|}d }d |_d }|D]B}t|tr|j }|||d}|j|||d7_d }qg}|j D]4\}\} } } } } | | | | | f|t ||fq|jtt|jd g|_}|D]}| |dqB|S)Nrrrrrr)r-rrrgrgzCan't have mixed argument typerr.z, )keyr-)r3r&rBintrXrKrl sort_typerrr:rNappendrOsortr TupleCompcompare)r)Zfieldr+Z sort_arg_defsZ sort_tupleZ connectorrjZ stats_listrPrQrRrSrTrUr3tuplerrr sort_statssF     zStats.sort_statscCs|jr|j|SN)r3reverser)rrr reverse_orders zStats.reverse_ordercCs|j}i|_}d}|D]\}\}}}}} t|} tt| |krRtt| }i} | D]\} } | | t| <q^| |krt|| ||||| f|| <q||||| f|| <q|j}t|_}|D]}|t|q||_ d|_ d|_ |SrV) r:rNfunc_strip_pathr&rOrYr9r8r(r7r3r1)r)ZoldstatsZnewstatsr7rPrQrRrSrTrUZnewfuncZ newcallersfunc2callerZold_topZnew_toprrr strip_dirss0    zStats.strip_dirsc Cst|jr dSi|_}|jD]P\}\}}}}}||kr@i||<|D]$\}} ||kr`i||<| |||<qHqdSrv)r1r:rN) r)r1rPrQrRrSrTrUr{r|rrr calc_callees#s zStats.calc_calleescCs|}t|trpzt|}Wn*tjk rF|d|7}||fYSXg}|D]}|t|rP||qPnzt|}t|t rd|krdkrnnt ||d}|d|}n2t|t rd|kr|krnn|}|d|}t|t|kr|dt|t||f7}||fS)Nz# gg?g?rz6 List reduced from %r to %r due to restriction <%r> ) rBrrecompileerrorsearchrOrpr&floatrn)r)ZsellistmsgZnew_listZrexrPcountrrreval_print_amount6s2  "" zStats.eval_print_amountcCs|j}|jr*|jdd}d|jd}nt|j}d}|D]}||||\}}q@t|}|sld|fSt||j d|t|jkrd}|D] }tt ||krtt |}q|d|fS)Nz Ordered by:  z! Random listing order was used rr/rg) r7r3rorr:keysrr&r?r#rO)r)Zsel_listwidthZ stat_listrZ selectionrrPrrrget_print_listPs$zStats.get_print_listcGs|jD]}t||jdq|jr,t|jdd}|jD]}t|t||jdq6t||jdd|jd|j|jkrtd|jd|jdtd|j|jdt|jd||\}}|r| |D]}| |qt|jdt|jd|S)Nr/ zfunction calls endr0z(%d primitive calls)zin %.3f seconds) r2r?r#r9func_get_function_namer5r6r4r print_title print_line)r)amountr indentrPrrrrr print_statshs(        zStats.print_statscGsz||\}}|rv|||d|D]2}||jkrN||||j|q*|||iq*t|jdt|jd|S)Nz called...r/)rr~print_call_headingr1print_call_liner?r#)r)rrrrPrrr print_calleess    zStats.print_calleesc Gsh||\}}|rd||d|D](}|j|\}}}}} |||| dq"t|jdt|jd|S)Nzwas called by...z<-r/)rrr:rr?r#) r)rrrrPrQrRrSrTrUrrr print_callerss   zStats.print_callersc Csvtd|||jdd}|jD]0\}}}}}|r&tt|} t| t}qXq&|rrtd|d|jddS)Nz Function r/Frz ncalls tottime cumtime) r?ljustr#r:rnextiterrBrt) r) name_sizeZ column_titleZ subheaderrQrRrSrTrUrrrrrs zStats.print_call_heading->cCstt|||d|jd|s2t|jddSt|}d}|D]}t|}||} t| tr| \} } } } | | krd| | f}n d| f}d|dd t |t | t | |f}|d }n$d || t |j |d f}|d }t||||jdd}qFdS) Nrrr/r.z%d/%dz%dz %s %s %s %srfrgrz %s(%r) %sr_) r?rOrr#sortedrrBrtrjustr&f8r:)r)rsourceZ call_dictZarrowZclistrrPr rrRrQrSrTZsubstatsZ left_widthrrrrs0      zStats.print_call_linecCs"tdd|jdtd|jddS)Nz- ncalls tottime percall cumtime percallrrzfilename:lineno(function)r/r?r#rxrrrrszStats.print_titlecCs|j|\}}}}}t|}||kr4|dt|}t|dd|jdtt|d|jd|dkrxtdd|jdntt||d|jdtt|d|jd|dkrtdd|jdntt||d|jdtt||jddS)N/ rrrrr/)r:rr?rr#rrO)r)rPrQrRrSrTrUcrrrrszStats.print_line)r)rr r!__doc__r,r'r<r=r(r^rhrlruryr}r~rrrrrrrrrrrrrr7sF!  '  c@s eZdZdZddZddZdS)rraThis class provides a generic function for comparing any two tuples. Each instance records a list of tuple-indices (from most significant to least significant), and sort direction (ascending or decending) for each tuple-index. The compare functions can then be used as the function argument to the system sort() function when a list of tuples need to be sorted in the instances order.cCs ||_dSrvcomp_select_list)r)rrrrr,szTupleComp.__init__cCsF|jD]:\}}||}||}||kr0| S||kr|SqdSrVr)r)leftrightindex directionlrrrrrss  zTupleComp.compareN)rr r!rr,rsrrrrrrsrrcCs|\}}}tj|||fSrv)rFpathbasename) func_namer r r rrrrzs rzcCs|dS)Nrgr)rPrrrrsrcCsN|dddkrB|d}|dr<|drz{%s}rr-z %s:%d(%s)) startswithendswith)rr rrrrOs rOc Cs@|\}}}}}|\}}} } } |||||| || t| |fS)z3Add together all the stats for two profile entries.) add_callers) targetrrQrRrSrTrUZt_ccZt_ncZt_ttZt_ctZ t_callersrrrrYs rYcCsi}|D]\}}|||<q |D]V\}}||krtt|trbtddt|||D||<q||||7<q&|||<q&|S)z*Combine two caller lists in a single list.css|]\}}||VqdSrvr).0ijrrr szadd_callers..)rNrBrtzip)rrZ new_callersrPr|rrrr s  " rcCsd}|D] }||7}q |S)z@Sum the caller statistics to get total number of calls received.r)r)rUrRrrrr count_callss  rcCsd|S)Nz%8.3fr)xrrrr(sr__main__c@seZdZd6ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5ZdS)7ProfileBrowserNcCs6tj|d|_d|_tj|_|dk r2||dS)N% ) cmdCmdr,promptr:r$r%r#do_read)r)profilerrrr,7s  zProfileBrowser.__init__c Cs|}g}|D]}z|t|WqWntk r>YnXzAdd profile info from given file to current statistics object.r/rrxrrrhelp_addhszProfileBrowser.help_addcCs |d|S)Nrrr)r rrr do_calleeskszProfileBrowser.do_calleescCstd|jd|dS)Nz6Print callees statistics from the current stat object.r/r?r#rrxrrr help_calleesmszProfileBrowser.help_calleescCs |d|S)Nrrrrrr do_callersqszProfileBrowser.do_callerscCstd|jd|dS)Nz6Print callers statistics from the current stat object.r/rrxrrr help_callerssszProfileBrowser.help_callerscCstd|jddS)Nr.r/rrrrrrdo_EOFwszProfileBrowser.do_EOFcCstd|jddSNzLeave the profile browser.r/rrxrrrhelp_EOFzszProfileBrowser.help_EOFcCsdS)Nrrrrrrdo_quit}szProfileBrowser.do_quitcCstd|jddSrrrxrrr help_quitszProfileBrowser.help_quitc Cs|rzt||_Wnztk rN}zt|jd|jdWYdSd}~XYn@tk r}z"t|jjd||jdWYdSd}~XYnX|d|_ n6t |j dkr|j dd}| |ntd|jddS) Nrr/:rrgz1No statistics object is current -- cannot reload.r) rr:rr?r*r#r>rLrrr&r)r)r errrrrrs  zProfileBrowser.do_readcCs td|jdtd|jddS)Nz+Read in profile data from a specified file.r/z*Without argument, reload the current file.rrxrrr help_readszProfileBrowser.help_readcCs$|jr|jntd|jddS)Nrr/r)r:ryr?r#rrrr do_reverses zProfileBrowser.do_reversecCstd|jddS)Nz/Reverse the sort order of the profiling report.r/rrxrrr help_reverseszProfileBrowser.help_reversecs|jstd|jddS|j|rRtfdd|DrR|jj|n.z/Valid sort keys (unique prefixes are accepted):z%s -- %srr) r:r?r#rlallrrurrhrN)r)r rmrrrrdo_sorts zProfileBrowser.do_sortcCs td|jdtd|jddS)Nz.Sort profile data according to specified keys.r/z3(Typing `sort' without arguments lists valid keys.)rrxrrr help_sortszProfileBrowser.help_sortcsfddtjDS)Ncsg|]}|r|qSr)r)ratextrr s z0ProfileBrowser.complete_sort..)rrh)r)rr*rrr complete_sortszProfileBrowser.complete_sortcCs |d|S)Nrrrrrrdo_statsszProfileBrowser.do_statscCstd|jd|dS)Nz.Print statistics from the current stat object.r/rrxrrr help_statsszProfileBrowser.help_statscCs$|jr|jntd|jddS)Nrr/)r:r}r?r#rrrrdo_strips zProfileBrowser.do_stripcCstd|jddS)NzsR