/snap/core18/2999/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/2999/usr/lib/python3.6/__pycache__/profile.cpython-36.pyc (13901B)
3 NqiV@sdZddlZddlZddlZddlZddlmZdddgZGdddZdd dZ dd dZ Gd ddZ d dZ e dkre dS)z Class for profiling Python code.N) OptionParserrunrunctxProfilec@s0eZdZdZddZddZddZdd Zd S) _UtilszSupport class for utility functions which are shared by profile.py and cProfile.py modules. Not supposed to be used directly. cCs ||_dS)N)profiler)selfrr /usr/lib/python3.6/profile.py__init__1sz_Utils.__init__cCsF|j}z(y|j|Wntk r,YnXWd|j|||XdS)N)rr SystemExit_show)r statementfilenamesortprofr r r r4s  z _Utils.runcCsJ|j}z,y|j|||Wntk r0YnXWd|j|||XdS)N)rrr r )rrglobalslocalsrrrr r r r=s  z _Utils.runctxcCs"|dk r|j|n |j|dS)N) dump_stats print_stats)rrrrr r r r Fs z _Utils._showN)__name__ __module__ __qualname____doc__r rrr r r r r r+s   rcCsttj|||S)aRun statement under profiler optionally saving results in filename This function takes a single argument that can be passed to the "exec" statement, and an optional file name. In all cases this routine attempts to "exec" its first argument and gather profiling statistics from the execution. If no file name is present, then this function automatically prints a simple profiling report, sorted by the standard name string (file/line/function-name) that is presented in each line. )rrr)rrrr r r rRs cCsttj|||||S)zRun statement under profiler, supplying your own globals and locals, optionally saving results in filename. statement and filename have the same semantics as profile.run )rrr)rrrrrr r r r_sc@seZdZdZdZd4ddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ e e e e e e dZddZGdddZGdddZddZdd Zd6d"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd7d0d1Zd2d3ZdS)8raProfiler class. self.cur is always a tuple. Each such tuple corresponds to a stack frame that is currently active (self.cur[-2]). The following are the definitions of its members. We use this external "parallel stack" to avoid contaminating the program that we are profiling. (old profiler used to write into the frames local dictionary!!) Derived classes can change the definition of some entries, as long as they leave [-2:] intact (frame and previous tuple). In case an internal error is detected, the -3 element is used as the function name. [ 0] = Time that needs to be charged to the parent frame's function. It is used so that a function call will not have to access the timing data for the parent frame. [ 1] = Total time spent in this frame's function, excluding time in subfunctions (this latter is tallied in cur[2]). [ 2] = Total time spent in subfunctions, excluding time executing the frame's function (this latter is tallied in cur[1]). [-3] = Name of the function that corresponds to this frame. [-2] = Actual frame that we correspond to (used to sync exception handling). [-1] = Our parent 6-tuple (corresponds to frame.f_back). Timing data for each function is stored as a 5-tuple in the dictionary self.timings[]. The index is always the name stored in self.cur[-3]. The following are the definitions of the members: [0] = The number of times this function was called, not counting direct or indirect recursion, [1] = Number of times this function appears on the stack, minus one [2] = Total time spent internal to this function [3] = Cumulative time that this function was present on the stack. In non-recursive functions, this is the total execution time from start to finish of each invocation of a function, including time spent in all subfunctions. [4] = A dictionary indicating for each function name, the number of times it was called by us. rNc Csi|_d|_d|_d|_|dkr&|j}||_|sHtj|_|_|j |_ nl||_|j}y t |}Wn"t k r||_|j |_ Yn0X|dkr|j |_ n|j|_ |tfdd}||_|j|_|jddS)NcSs ||S)Nr )timersumr r r get_time_timersz(Profile.__init__..get_time_timerr)timingscurcmd c_func_namebiastimeZ process_timerget_timetrace_dispatch_i dispatcherlen TypeErrortrace_dispatchtrace_dispatch_lrt simulate_call)rrr$r-Zlengthrr r r r s0    zProfile.__init__cCs|j}|}|d|d|j|j}|dkr8|j|_|j||||rd|}|d|d|_n|}|d|d||_dS)Nrrc_call)rr-r$rr#dispatch)rframeeventargrr-rr r r r+szProfile.trace_dispatchcCsT|j}||j|j}|dkr(|j|_|j||||rD||_n |||_dS)Nr/)rr-r$rr#r0)rr1r2r3rr-r r r r's zProfile.trace_dispatch_icCs`|j}|d|j|j}|dkr,|j|_|j||||rL|d|_n|d||_dS)NgN@r/)rr-r$rr#r0)rr1r2r3rr-r r r trace_dispatch_macszProfile.trace_dispatch_maccCsT|j}||j|j}|dkr(|j|_|j||||rD||_n |||_dS)Nr/)r&r-r$rr#r0)rr1r2r3r&r-r r r r,s zProfile.trace_dispatch_lc CsD|j\}}}}}}||k r*|r*|j||S|||||||f|_dS)Nr)r!trace_dispatch_return) rr1r-rptritretrfnrframercurr r r trace_dispatch_exceptions   z Profile.trace_dispatch_exceptioncCs|jr|j|jdk r|j\}}}}}}t|tjs|j|jksXtd|||j||jf|j|d|jdks|j|jdkstd|jdf|j} | j| j | j f} |dd| ||jf|_|j } | | kr| | \} } }}}| | d|||f| | <nddddif| | <dS) NrzBad callrrr?) r!f_back isinstancer fake_frameAssertionErrorr6f_code co_filenameco_firstlinenoco_namer )rr1r-r7r8r9r:r;r<Zfcodefnr ccnsttctcallersr r r trace_dispatch_calls&    zProfile.trace_dispatch_callc Csndd|jf}|dd|||jf|_|j}||krX||\}}}}} ||d||| f||<nddddif||<dS)Nrrr)r#r!r ) rr1r-rIr rJrKrLrMrNr r r trace_dispatch_c_calls zProfile.trace_dispatch_c_callcCs||jdk rB||jdjks0td|jdf|j|jd d|j\}}}}}}||}||}|\} } } } } }| | || || | |f|_|j}||\}}}}}|s||}|d}| |kr|| d|| <nd|| <||d||||f||<dS) Nrz Bad returnr>rrr?r?r@r?)r!rArDr6r )rr1r-r7r8r9r:r<Z frame_totalZpptZpitZpetZpfnpframeZpcurr rJrKrLrMrNr r r r6#s$"zProfile.trace_dispatch_return)callZ exceptionreturnr/Z c_exceptionZc_returncCs"|jdrdS||_|j|dS)Nr)r!r"r.)rr"r r r set_cmdYs zProfile.set_cmdc@seZdZddZddZdS)zProfile.fake_codecCs||_||_||_d|_dS)Nr)rFco_linerHrG)rrlinenamer r r r _szProfile.fake_code.__init__cCst|j|j|jfS)N)reprrFrVrH)rr r r __repr__eszProfile.fake_code.__repr__N)rrrr rZr r r r fake_code^sr[c@seZdZddZdS)zProfile.fake_framecCs||_||_dS)N)rErA)rcodeZpriorr r r r iszProfile.fake_frame.__init__N)rrrr r r r r rChsrCcCsF|jdd|}|jr |jd}nd}|j||}|jd||ddS)NZprofilerrrRr?)r[r!rCr0)rrXr\rQr1r r r r.ms   zProfile.simulate_callcCsN|j}||j}x*|jdr<|jd||jd|d}qW|||_dS)NrrSrrrTr?)r&r-r!r0)rr&r-r r r simulate_cmd_completeys   zProfile.simulate_cmd_completercCs$ddl}|j|jj|jdS)Nr)pstatsZStatsZ strip_dirsZ sort_statsr)rrr^r r r rszProfile.print_statsc Cs0t|d}|jtj|j|WdQRXdS)Nwb)open create_statsmarshaldumpstats)rfilefr r r rs zProfile.dump_statscCs|j|jdS)N)r]snapshot_stats)rr r r raszProfile.create_statsc Csfi|_xZ|jjD]L\}\}}}}}|j}d}x|jD] }||7}q:W|||||f|j|<qWdS)Nr)rdr itemscopyvalues) rfuncrJrKrLrMrNZncZcallcntr r r rgs zProfile.snapshot_statscCsddl}|j}|j|||S)Nr)__main____dict__r)rr"rldictr r r rsz Profile.runc Cs8|j|tj|jzt|||WdtjdX|S)N)rUsys setprofiler(exec)rr"rrr r r rs    zProfile.runctxc Os6|jt|tj|jz |||StjdXdS)N)rUrYrorpr()rrkargskwr r r runcalls   zProfile.runcallc Cs8|jtk rtd|j}d|_z |j||S||_XdS)Nz&Subclasses must override .calibrate().r) __class__rr*r$_calibrate_inner)rmverboseZ saved_biasr r r calibrates  zProfile.calibratecCs$|j}dd}|fdd}|||}|||}||}|rLtd|t} |}| jdtt|}||} |rtd| d} d} x>| jjD]0\\} }}\}}}}}|dkr| |7} | |7} qW|rtd | td | | |d krtd| | |d| }|r td||S)NcSsxt|D]}d}q WdS)Nr)range)nixr r r f1sz$Profile._calibrate_inner..f1cSsxt|D] }|dq WdS)Nd)rz)rwr~r|r r r rfsz#Profile._calibrate_inner..fz elapsed time without profiling =zf(m)zelapsed time with profiling =grfr~z!'CPU seconds' profiler reported =ztotal # calls =rz internal error: total calls = %dg@z+mean stopwatch overhead per profile event =)rfr~) r&printrrrrr rh ValueError)rrwrxr&r~rfZt0Zt1Zelapsed_noprofilepZelapsed_profileZ total_callsZ reported_timerrWfuncnamerJrKrLrMrNZmeanr r r rvsB   "     zProfile._calibrate_inner)NNrT)rT)r)rrrrr$r r+r'r5r,r=rOrPr6r0rUr[rCr.r]rrrargrrrtryrvr r r r rhs>% ' '      1 c Csd}t|d}d|_|jdddddd|jd d d d ddtjd ds\|jtjd|j\}}|tjdd<t|dkr|d}tj j dt j j |t |d}t|j|d}WdQRX|dddd}t||d|j|jn|j|S)Nz?profile.py [-o output_file_path] [-s sort] scriptfile [arg] ...)usageFz-oz --outfileoutfilezSave stats to )desthelpdefaultz-sz--sortrz?Sort order when printing to stdout, based on pstats.Stats classrrrrbrqrl)__file__r __package__ __cached__rT)rZallow_interspersed_argsZ add_optionroargvZ print_usageexit parse_argsr)pathinsertosdirnamer`compilereadrrr)rparserZoptionsrrZprognamefpr\Zglobsr r r main*s2        rrlrT)NrTrT)NrT)rrorr%rbZoptparser__all__rrrrrrr r r r  s   ' E"