/snap/core22/2411/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc424320644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc136700644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2411/usr/lib/python3.10/__pycache__/profile.cpython-310.pyc (14391B)
o `wicY@szdZddlZddlZddlZddlZgdZGdddZdddZdd d ZGd d d Z d dZ e dkr;e dSdS)z Class for profiling Python code.N)runrunctxProfilec@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 ||_dSN)profiler)selfrr /usr/lib/python3.10/profile.py__init__0 z_Utils.__init__c Csd|}z%z||Wn tyYn wW||||dSW||||dS||||wr)rr SystemExit_show)r statementfilenamesortprofr r r r3s "z _Utils.runc Csh|}z'z ||||Wn tyYn wW||||dSW||||dS||||wr)rrr r)rrglobalslocalsrrrr r r r<s "z _Utils.runctxcCs$|dur ||dS||dSr) dump_stats print_stats)rrrrr r r rEsz _Utils._showN)__name__ __module__ __qualname____doc__r rrrr r r r r*s  rcCstt|||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 rQs rcCstt|||||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^src@seZdZdZdZd4ddZddZdd Zd d Zd d Z ddZ ddZ ddZ ddZ e e e e e e dZddZGdddZGdddZddZdd Zd5d"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd6d0d1Zd2d3ZdS)7raProfiler 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. rNcCsi|_d|_d|_d|_|dur|j}||_|s$tj|_|_|j |_ n5||_|}zt |}Wnt yA||_|j |_ Ynw|dkrK|j |_ n|j|_ |tfdd}||_||_|ddS)NcSs ||Srr )timersumr r r get_time_timerr z(Profile.__init__..get_time_timerr)timingscurcmd c_func_namebiastime process_timerget_timetrace_dispatch_i dispatcherlen TypeErrortrace_dispatchtrace_dispatch_lrt simulate_call)rrr%r/lengthr r r r r s2      zProfile.__init__cCs|j}|}|d|d|j|j}|dkr|j|_|j||||r3|}|d|d|_dS|}|d|d||_dS)Nrc_callrr/r%rr$dispatch)rframeeventargrr/rr r r r-szProfile.trace_dispatchcCV|j}||j|j}|dkr|j|_|j||||r#||_dS|||_dSNr3r4rr6r7r8rr/r r r r) zProfile.trace_dispatch_icCsb|j}|d|j|j}|dkr|j|_|j||||r'|d|_dS|d||_dS)NgN@r3r4r<r r r trace_dispatch_macszProfile.trace_dispatch_maccCr:r;)r(r/r%rr$r5)rr6r7r8r(r/r r r r.r=zProfile.trace_dispatch_lc CsD|j\}}}}}}||ur|r|||S|||||||f|_dSNr2)r"trace_dispatch_return) rr6r/rptritretrfnrframercurr r r trace_dispatch_exceptions   z Profile.trace_dispatch_exceptioncCs |jrH|j|jdurH|j\}}}}}}t|tjsH|j|jus,Jd|||j||jf||d|jdusH|j|jdusHJd|jdf|j} | j| j| j f} |dd| ||jf|_|j } | | vrz| | \} } }}}| | d|||f| | <dSddddif| | <dS)NzBad callrr2) r"f_back isinstancer fake_framer@f_code co_filenameco_firstlinenoco_namer!)rr6r/rArBrCrDrErFfcodefnr!ccnsttctcallersr r r trace_dispatch_calls,   zProfile.trace_dispatch_callc Cspdd|jf}|dd|||jf|_|j}||vr-||\}}}}} ||d||| f||<dSddddif||<dS)Nrrr2)r$r"r!) rr6r/rRr!rSrTrUrVrWr r r trace_dispatch_c_calls zProfile.trace_dispatch_c_callcCs||jdur!||jdjusJd|jdf||jdd|j\}}}}}}||}||}|\} } } } } }| | || || | |f|_|j}||\}}}}}|s]||}|d}| |vrj|| d|| <nd|| <||d||||f||<dS)NrHz Bad returnrIrr2)r"rJr@r!)rr6r/rArBrCrDrF frame_totalpptpitpetpfnpframepcurr!rSrTrUrVrWr r r r@"s$"zProfile.trace_dispatch_return)call exceptionreturnr3 c_exceptionc_returncCs"|jdrdS||_||dSNr)r"r#r0)rr#r r r set_cmdXszProfile.set_cmdc@seZdZddZddZdS)zProfile.fake_codecCs||_||_||_d|_dSNr)rNco_linerPrO)rrlinenamer r r r ^s zProfile.fake_code.__init__cCst|j|j|jfSr)reprrNrirPrr r r __repr__dszProfile.fake_code.__repr__N)rrrr rnr r r r fake_code]s roc@seZdZddZdS)zProfile.fake_framecCs||_||_dSr)rMrJ)rcodepriorr r r r hs zProfile.fake_frame.__init__N)rrrr r r r r rLgs rLcCsF|dd|}|jr|jd}nd}|||}|jd||ddS)NprofilerrHra)ror"rLr5)rrkrpr_r6r r r r0ls   zProfile.simulate_callcCsR|j}||j}|jdr!|jd||jd|d}|jds|||_dS)NrrcrHr)r(r/r"r5)rr(r/r r r simulate_cmd_completexs   zProfile.simulate_cmd_completercCs$ddl}|||dSrh)pstatsStats strip_dirs sort_statsr)rrrtr r r rs zProfile.print_statscCsFt|d}|t|j|WddS1swYdS)Nwb)open create_statsmarshaldumpstats)rfilefr r r rs "zProfile.dump_statscCs||dSr)rssnapshot_statsrmr r r rzs zProfile.create_statsc Cs^i|_|jD]$\}\}}}}}|}d}|D]}||7}q|||||f|j|<qdSrh)r}r!itemscopyvalues) rfuncrSrTrUrVrWnccallcntr r r rs  zProfile.snapshot_statscCsddl}|j}||||Srh)__main____dict__r)rr#rdictr r r rsz Profile.runc Cs@||t|jzt|||Wtd|Stdwr)rgsys setprofiler*exec)rr#rrr r r rs    zProfile.runctxc OsB|t|t|jz ||i|WtdStdwr)rgrlrrr*)rrargskwr r r runcalls  zProfile.runcallcCs<|jtur td|j}d|_z |||W||_S||_w)Nz&Subclasses must override .calibrate().r) __class__rr,r%_calibrate_inner)rmverbose saved_biasr r r calibrates  zProfile.calibratecCs|j}dd}|fdd}|||}|||}||}|r&td|t} |}| dtt|}||} |rCtd| d} d} | jD]\\} }}\}}}}}|d vrd| |7} | |7} qL|rqtd | td | | |d kr}td | | |d| }|rtd||S)NcSst|D]}d}qdSr?range)nixr r r f1s z$Profile._calibrate_inner..f1cSst|D]}|dqdS)Ndr)rrrr r r rs  z#Profile._calibrate_inner..fz elapsed time without profiling =zf(m)zelapsed time with profiling =g)rrz!'CPU seconds' profiler reported =ztotal # calls =r2z internal error: total calls = %dg@z+mean stopwatch overhead per profile event =) r(printrrrrr!r ValueError)rrrr(rrt0t1elapsed_noprofilepelapsed_profile total_calls reported_timerrjfuncnamerSrTrUrVrWmeanr r r rsD        zProfile._calibrate_inner)NN)r)r)rrrrr%r r-r)r>r.rGrXrYr@r5rgrorLr0rsrrrzrrrrrrr r r r rgsB& ' '    1 rc Csddl}ddlm}d}||d}d|_|jdddd dd |jd d d ddd|jdddddd tjddsB|td| \}}|tjdd<|j dur\|j |j |_ t |dkr|jrtddl}d}|j|dd}n3|d} tj d|j | t| } t| | d}Wdn1swY| dddd}z t||d|j |jW|Sty} zdt_t| jWYd} ~ |Sd} ~ ww||S)Nr) OptionParserzMprofile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...)usageFz-oz --outfileoutfilezSave stats to )desthelpdefaultz-mmodule store_truezProfile a library module.)ractionrrz-sz--sortrz?Sort order when printing to stdout, based on pstats.Stats classrr2rz(run_module(modname, run_name='__main__')) run_modulemodnamerr)__file__r __package__ __cached__)osoptparserallow_interspersed_args add_optionrargv print_usageexit parse_argsrpathabspathr+rrunpyrinsertdirnameio open_codecompilereadrrBrokenPipeErrorstdouterrno) rrrparseroptionsrrrpglobsprognamefpexcr r r main)sd          rrrf) rrrr&r{__all__rrrrrrr r r r s" '  E9