/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__/pstats.cpython-36.pyc (21857B)
3 Nqig@sfdZddlZddlZddlZddlZddlZddlmZdgZGdddZ GdddZ dd Z d d Z d d Z ddZddZddZddZedkrbddlZy ddlZWnek rYnXGdddejZeejdkrejdZndZyTeeZx"ejddD]ZejeqWedejdej edejdWne!k r`YnXdS)z3Class for printing reports on profiled python code.N) cmp_to_keyStatsc@seZdZdZddddZddZdd Zd d Zd d ZddZ dBdFdJdNdQdTdWdZd]dbdfdidmdqd!Z d"d#Z d$d%Z d&d'Z d(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zdrd9d:Zd;d<Zd=d>ZdS)sraThis 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 an arbitrary number of quoted strings to select the sort order. For example sort_stats('time', '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||j|dS)Nr)sysstdoutrleninitadd)selfrargsargr/usr/lib/python3.6/pstats.py__init__As   zStats.__init__c Csd|_g|_d|_d|_d|_d|_d|_t|_i|_ i|_ |j |y |j Wn8t k rtd|jrx|jdnd|jdYnXdS)NrzInvalid timing data %sr)file) 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 Ks"  z Stats.initcCs|dkri|_dSt|trxt|d}tj||_WdQRXy"tj|}tj |j d|}Wn YnX|g|_ n t |dr|j |j|_i|_|jstd|j|fdS)Nrbz create_statsz.Cannot create or construct a %r object from %r)r isinstancestropenmarshalloadosstattimeZctimest_mtimerhasattrr$ TypeError __class__)r r fZ file_statsrrrr^s(     zStats.load_statscCsx~|jjD]p\}\}}}}}|j|7_|j|7_|j|7_d|kr\|jj|tt||j kr tt||_ q WdS)Njprofilerprofiler)r2rr3) ritemsrrrrr rfunc_std_stringr)r funcccncttctcallersrrrr ts zStats.get_top_level_statscGs|s|Sxt|D]}t|t|kr.t|}|j|j7_|j|j7_|j|j7_|j|j7_x|jD]}|jj|qvW|j |j kr|j |_ d|_ xJ|j j D]<\}}||j kr|j |}nddddif}t |||j |<qWqW|S)Nr)reversedtyperrrrrrr rrrr4add_func_stats)r arg_listitemr6r+Z old_func_statrrrr ~s(    z Stats.addc Cs(t|d}tj|j|WdQRXdS)z:Write the profile data to a file we know how to load back.wbN)r'r(dumpr)r filenamer1rrr dump_statss zStats.dump_statsr call countcumulative time file name line number function namename/file/linerprimitive call count standard name internal time)callsZncallsZcumtime cumulativerrClinemodulenameZnflZpcallsstdnamer,ZtottimecCs|jszi|_}i}xP|jjD]B\}}|}x4|r`|s8P||krJd||<P|||<|dd}q.Wq Wx|D] }||=qlW|jS)z)Expand all abbreviations that are unique.rNrr)rsort_arg_dict_defaultr4)r dictZbad_listwordtupZfragmentrrrget_sort_arg_defss    zStats.get_sort_arg_defscGs"|sd|_|St|dkrFt|dtrFd dddddddi|dg}|j}f}d|_d}x:|D]2}|||d}|j|||d7_d }qbWg}xB|jjD]4\}\}} } } } |j|| | | f|t ||fqW|j t t |j d g|_} x|D]}| j|d qW|S) NrrrYrTr,rRrUrz, )keyrr)rrr%intr^ sort_typerr4appendr5sortr TupleCompcompare)r ZfieldZ sort_arg_defsZ sort_tupleZ connectorr\Z stats_listr6r7r8r9r:r;rtuplerrr sort_statss2   zStats.sort_statscCs|jr|jj|S)N)rreverse)r rrr reverse_orders zStats.reverse_ordercCs|j}i|_}d}x|jD]\}\}}}}} t|} tt| |krTtt| }i} x | jD]\} } | | t| <qbW| |krt|| ||||| f|| <q||||| f|| <qW|j}t|_}x|D]}|jt|qW||_ d|_ d|_ |S)Nr) rr4func_strip_pathrr5r>rrr rrr)r ZoldstatsZnewstatsrr6r7r8r9r:r;ZnewfuncZ newcallersfunc2callerZold_topZnew_toprrr strip_dirss.    zStats.strip_dirsc Cs||jr dSi|_}xb|jjD]T\}\}}}}}||krBi||<x0|jD]$\}} ||krdi||<| |||<qLWq WdS)N)rrr4) r rr6r7r8r9r:r;rkrlrrr calc_calleess zStats.calc_calleesc Cs|}t|trpytj|}Wn&tjk rB|d|7}||fSXg}x|D]}|jt|rN|j|qNWnzt|}t|t rd|kodknrt ||d}|d|}n2t|t rd|ko|knr|}|d|}t|t|kr|dt|t||f7}||fS)Nz# gg?g?rz6 List reduced from %r to %r due to restriction <%r> ) r%r&recompileerrorsearchr5rbrfloatr`)r ZsellistmsgZnew_listZrexr6countrrreval_print_amounts,    "" zStats.eval_print_amountcCs|j}|jr*|jdd}d|jd}nt|jj}d}x|D]}|j|||\}}qBWt|}|spd|fSt||j d|t|jkrd}x(|D] }tt ||krtt |}qW|d|fS)Nz Ordered by:  z! Random listing order was used r)rrR) rrrartrkeysrwrr"rr5)r Zsel_listwidthZ stat_listruZ selectionrvr6rrrget_print_list2s$  zStats.get_print_listcGsx|jD]}t||jdqW|jr0t|jdd}x"|jD]}t|t||jdqcCs tt|j||d|jd|s2t|jddSt|j}d}x|D]}t|}||} t| tr| \} } } } | | krd| | f}n d| f}d|jdd t |t | t | |f}|d }n$d || t |j |d f}|d }t||||jdd}qHWdS) Nr|)r~r)rrz%d/%dz%dz %s %s %s %srPrRrz %s(%r) %srF) r"r5rrsortedryr%rfrjustrf8r)r rsourceZ call_dictZarrowZclistrr6rXrr8r7r9r:ZsubstatsZ left_widthrrrrs*       zStats.print_call_linecCs"tdd|jdtd|jddS)Nz- ncalls tottime percall cumtime percallr|)r~rzfilename:lineno(function))r)r"r)r rrrrszStats.print_titlecCs|j|\}}}}}t|}||kr4|dt|}t|jdd|jdtt|d|jd|dkrxtdd|jdntt||d|jdtt|d|jd|dkrtd d|jdntt||d|jdtt||jddS) N/ r|)r~rrr})rz z )rr&r"rrrr5)r r6r7r8r9r:r;crrrrszStats.print_linerrrr)rrErrrr)rrErrFrr)rrGrrFrr)rrGrHrr)rrIrHrr)rrIrJrr)rrKrHrr)rrIrLrr)rrMrLrrHrrJrrrr)rrNrrrr)rrOrPrr)rrQrrRrr)rrSrrRrr)rrS)r)__name__ __module__ __qualname____doc__rr rr r rDrZr^rgrirmrnrwr{rrrrrrrrrrrr sF     c@s eZdZdZddZddZdS)rdaThis 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 ||_dS)N)comp_select_list)r rrrrrszTupleComp.__init__cCsBx<|jD]2\}}||}||}||kr.| S||kr|SqWdS)Nr)r)r leftrightindex directionlrrrrreszTupleComp.compareN)rrrrrrerrrrrdsrdcCs|\}}}tjj|||fS)N)r*pathbasename) func_namerCrVrXrrrrjs rjcCs|dS)NrRr)r6rrrrsrcCsN|ddd krB|d}|jdr<|jdrz{%s}rz %s:%d(%s))rrr) startswithendswith)rrXrrrr5s r5c Cs@|\}}}}}|\}}} } } |||||| || t| |fS)z3Add together all the stats for two profile entries.) add_callers) targetrr7r8r9r:r;Zt_ccZt_ncZt_ttZt_ctZ t_callersrrrr>sr>cCsi}x|jD]\}}|||<qWxb|jD]V\}}||krzt|trhtddt|||D||<q|||7<q,|||<q,W|S)z*Combine two caller lists in a single list.cSsg|]}|d|dqS)rrr).0irrr szadd_callers..)r4r%rfzip)rrZ new_callersr6rlrrrrs   rcCs"d}x|jD] }||7}qW|S)z@Sum the caller statistics to get total number of calls received.r)r)r;r8rTrrr 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)7ProfileBrowserNcCs6tjj|d|_d|_tj|_|dk r2|j|dS)Nz% ) cmdCmdrpromptrrrrdo_read)r profilerrrrs  zProfileBrowser.__init__cCs|j}g}x|D]}y|jt|wWntk r>YnXy8t|}|dksZ|dkrjtd|jdw|j|wWntk rYnX|j|qW|jrt|j||ntd|jddS)Nrrz#Fraction argument must be in [0, 1])rzNo statistics object is loaded.) splitrbr` ValueErrorrsr"rrgetattr)r fnrVr Z processedZtermZfracrrrgeneric"s,  zProfileBrowser.genericcCsXtd|jdtd|jdtd|jdtd|jdtd|jdtd|jddS)NzArguments may be:)rz0* An integer maximum number of entries to print.z:* A decimal fractional number between 0 and 1, controllingz- what fraction of selected entries to print.z8* A regular expression; only entries with function namesz that match it are printed.)r"r)r rrr generic_help:s zProfileBrowser.generic_helpcCsd|jrRy|jj|Wq`tk rN}ztd||f|jdWYdd}~Xq`Xntd|jddS)Nz$Failed to load statistics for %s: %s)rzNo statistics object is loaded.r)rr IOErrorr"r)r rVerrrdo_addBs*zProfileBrowser.do_addcCstd|jddS)Nz>Add profile info from given file to current statistics object.)r)r"r)r rrrhelp_addKszProfileBrowser.help_addcCs |jd|S)Nr)r)r rVrrr do_calleesNszProfileBrowser.do_calleescCstd|jd|jdS)Nz6Print callees statistics from the current stat object.)r)r"rr)r rrr help_calleesPszProfileBrowser.help_calleescCs |jd|S)Nr)r)r rVrrr do_callersTszProfileBrowser.do_callerscCstd|jd|jdS)Nz6Print callers statistics from the current stat object.)r)r"rr)r rrr help_callersVszProfileBrowser.help_callerscCstd|jddS)Nr)rr)r"r)r rVrrrdo_EOFZszProfileBrowser.do_EOFcCstd|jddS)NzLeave the profile brower.)r)r"r)r rrrhelp_EOF]szProfileBrowser.help_EOFcCsdS)Nrr)r rVrrrdo_quit`szProfileBrowser.do_quitcCstd|jddS)NzLeave the profile brower.)r)r"r)r rrr help_quitbszProfileBrowser.help_quitcCs|ryt||_Wnjtk rF}zt|jd|jddSd}~Xn8tk r|}zt|jjd||jddSd}~XnX|d|_ n6t |j dkr|j dd}|j |ntd|jddS) Nr)r:z% rRz1No statistics object is current -- cannot reload.r) rrOSErrorr"r rr!r0rrrr)r rVerrrrrres  zProfileBrowser.do_readcCs td|jdtd|jddS)Nz+Read in profile data from a specified file.)rz*Without argument, reload the current file.)r"r)r rrr help_readvszProfileBrowser.help_readcCs$|jr|jjntd|jddS)NzNo statistics object is loaded.)rr)rrir"r)r rVrrr do_reversezs zProfileBrowser.do_reversecCstd|jddS)Nz/Reverse the sort order of the profiling report.)r)r"r)r rrr help_reverseszProfileBrowser.help_reversecs|jstd|jddS|jj|rRtfdd|jDrR|jj|jn@td|jdx0tjj D]"\}}td||df|jdqlWdS) NzNo statistics object is loaded.)rc3s|]}|kVqdS)Nr)rr)abbrevsrr sz)ProfileBrowser.do_sort..z/Valid sort keys (unique prefixes are accepted):z%s -- %srr) rr"rr^allrrgrrZr4)r rVr_rr)rrdo_sorts zProfileBrowser.do_sortcCs td|jdtd|jddS)Nz.Sort profile data according to specified keys.)rz3(Typing `sort' without arguments lists valid keys.))r"r)r rrr help_sortszProfileBrowser.help_sortcsfddtjDS)Ncsg|]}|jr|qSr)r)ra)textrrrsz0ProfileBrowser.complete_sort..)rrZ)r rr r)rr complete_sortszProfileBrowser.complete_sortcCs |jd|S)Nr)r)r rVrrrdo_statsszProfileBrowser.do_statscCstd|jd|jdS)Nz.Print statistics from the current stat object.)r)r"rr)r rrr help_statsszProfileBrowser.help_statscCs$|jr|jjntd|jddS)NzNo statistics object is loaded.)r)rrmr"r)r rVrrrdo_strips zProfileBrowser.do_stripcCstd|jddS)Nzrrrrrreadline ImportErrorrrrargvZ initprofileZbrowserrrr"rZcmdloopKeyboardInterruptrrrrsN