• File: cProfile.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/__pycache__/cProfile.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 4.69 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Sjm@szdZdddgZddlZddlZdddZdddZejje_ejje_Gd	ddejZd
dZ	dd
Z
edkrve
dS)zUPython interface for the 'lsprof' profiler.
   Compatible with the 'profile' module.
runrunctxProfileNcCstt|||S)N)
_pyprofile_Utilsrr)	statementfilenamesortr-/opt/alt/python37/lib64/python3.7/cProfile.pyrscCstt|||||S)N)rrrr)rglobalslocalsr	r
rrrrsc@sJeZdZdZdddZddZddZd	d
ZddZd
dZ	ddZ
dS)ra`Profile(timer=None, timeunit=None, subcalls=True, builtins=True)

    Builds a profiler object using the specified timer function.
    The default timer is a fast built-in one based on real time.
    For custom timer functions returning integers, timeunit can
    be a float specifying a scale (i.e. how long each integer unit
    is, in seconds).
    rcCs$ddl}|||dS)Nr)pstatsStatsZ
strip_dirsZ
sort_statsprint_stats)selfr
rrrrr(szProfile.print_statsc	Cs8ddl}t|d}|||j|WdQRXdS)Nrwb)marshalopencreate_statsdumpstats)rfilerfrrr
dump_stats,szProfile.dump_statscCs||dS)N)disablesnapshot_stats)rrrrr2szProfile.create_statsc
Cs6|}i|_i}xX|D]P}t|j}|j}||j}|j}|j}i}	|	|t|j<|||||	f|j|<qWx|D]}|j	rrt|j}x|j	D]}
y|t|
j}	Wnt
k
rwYnX|
j}||
j}|
j}|
j}||	kr|	|}||d7}||d7}||d7}||d7}||||f|	|<qWqrWdS)Nr)ZgetstatsrlabelcodeZ	callcountZreccallcountZ
inlinetimeZ	totaltimeidZcallsKeyError)rentriesZcallersdictsentryfuncZncZccZttZctZcallersZsubentryprevrrrr6s>






zProfile.snapshot_statscCsddl}|j}||||S)Nr)__main____dict__r)rcmdr)dictrrrr\szProfile.runcCs(|zt|||Wd|X|S)N)enableexecr)rr+r
rrrrras

zProfile.runctxcOsxt|dkr|^}}}n>|s&tdn0d|krB|d}|^}}ntdt|d|z
|||S|XdS)Nrz:descriptor 'runcall' of 'Profile' object needs an argumentr'z7runcall expected at least 1 positional argument, got %dr)len	TypeErrorpopr-r)argskwrr'rrrruncalljs



zProfile.runcallN)r)__name__
__module____qualname____doc__rrrrrrr4rrrrrs
&	cCs(t|trdd|fS|j|j|jfSdS)N~r)
isinstancestrco_filenameco_firstlinenoco_name)r"rrrr!s

r!c
	Cs^ddl}ddl}ddl}ddl}ddlm}d}||d}d|_|jdddd	dd
|jddd
ddt|j	j
d|jdddddd|jdds||
d|\}}||jdd<t|dkrR|jrd}	|j|dd}
nR|d}|jd|j|t|d}t||d}	WdQRX|dddd}
t|	|
d|j|jn||S)Nr)OptionParserzNcProfile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...)usageFz-oz	--outfileoutfilezSave stats to <outfile>)desthelpdefaultz-sz--sortr
z?Sort order when printing to stdout, based on pstats.Stats classr)rBrCrDchoicesz-mmodule
store_truezProfile a library module)rBactionrCrDrrz(run_module(modname, run_name='__main__'))
run_modulemodnamerbr.r))__file__r5__package__
__cached__)ossysrunpyrZoptparser?Zallow_interspersed_argsZ
add_optionsortedrZsort_arg_dict_defaultargvZprint_usageexit
parse_argsr/rFrIpathinsertdirnamercompilereadrrAr
)
rOrPrQrr?r@parserZoptionsr2r"ZglobsZprognamefprrrmainsJ






r]r))Nr)Nr)r8__all__Z_lsprofZprofilerrrZProfilerrr!r]r5rrrr<module>s




d1