KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.4/pstats.pyo
m
=5Dc@s\dZdkZdkZdkZdkZdgZdfdYZdfdYZdZdZ	dZ
d	Zd
ZdZ
dZed
jodkZy
dkZWnej
onXdeifdYZdkZdGHeeidjoeidZneZyeeidGHWnej
onXndS(s3Class for printing reports on profiled python code.NtStatscBstZdZdZdZdZdZdZdZhddd	ffd
f<ddd	ffd
f<dddffdf<dddffdf<dddffdf<dddffdf<dddfddfddffdf<ddd	ffd
f<dddffdf<dd d	ffd!f<Z	d"Z
d#Zd$Zd%Z
d&Zd'Zd(Zd)Zd*Zd+Zd,Zd-Zd.Zd/Zd0ZRS(1sCThis 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).  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 now return "self",  so you can string together commands like:
        Stats('foo', 'goo').strip_dirs().sort_stats('calls').                            print_stats(5).print_callers(5)
    cGsIt|p
d}n|d}|d}|i||i|dS(Nii(tlentargstNonetargtselftinittadd(RRR((t/usr/lib64/python2.4/pstats.pyt__init__Hs




cCsd|_g|_d|_d|_d|_d|_d|_h|_	h|_
h|_|i|d}z|id}Wd|o"dG|io|idGnHnXdS(NiisInvalid timing datai(RRtall_calleestfilestfcn_listttotal_ttttotal_callst
prim_callstmax_name_lent	top_leveltstatst
sort_arg_dictt
load_statsRttroubletget_top_level_stats(RRR((RRQs*										



cCs|p
h|_nt|tdjort|d}ti||_|iy-t	i
|}ti
|id|}WnnX|g|_n4t|do#|i|i|_h|_n|iptd|i|fndS(Nttrbs    tcreate_statss1Cannot create or construct a %r object from '%r''(RRRttypetopentftmarshaltloadtclosetoststatt
file_statsttimetctimetst_mtimeRthasattrRt	TypeErrort	__class__(RRRR"((RRgs&




cCsx|iiD]\}\}}}}}|i	|7_	|i
|7_
|i|7_|idod|i|<ntt||ijott||_qqWdS(Ntjprofileitprofiler(R)iR*(RRtitemstfunctcctncttttcttcallersRRR
thas_keyRRRtfunc_std_stringR(RR-R.R1R,R/R0((RR|scGs|p|Snt|djo|i|dn|d}t|t|jp|i|ijot|}n|i|i7_|i	|i	7_	|i
|i
7_
|i|i7_x|iD]}d|i|<qW|i|ijo|i|_nd|_xi|iiD]X\}}||ijo|i|}nddddhf}t|||i|<q"W|S(Nii(targ_listRRRtotherRR(RRRRR
RR,RRRRt	iteritemsR!t
old_func_stattadd_func_stats(RR4R7R!R5R,((RRs0
,
	cCs8t|d}zti|i|Wd|iXdS(s:Write the profile data to a file we know how to load back.twbN(tfiletfilenameRRtdumpRRR(RR;R((Rt
dump_statsstcallsiis
call countt
cumulativeiscumulative timeR:is	file nametlineisline numbertmoduletnameis
function nametnflsname/file/linetpcallsitstdnameis
standard nameR#is
internal timecCs|iph|_}h}xn|iiD]]\}}|}xH|o@|pPn||jod||<Pn|||<|d }qBWq-Wx|D]
}||=qWn|iS(s)Expand all abbreviations that are unique.iiN(	RRtdicttbad_listtsort_arg_dict_defaultR6twordttuptfragment(RRIRJRKRFRG((Rtget_sort_arg_defss(




cGs|pd|_|Snt|djoVt|dtdjo9hdd<dd<dd<dd<|dg}n|i}f}	d	|_d	}xA|D]9}|	||d}	|i|||d7_d
}qWg}xY|ii
D]H\}
\}}}
}}|i|||
|f|
t|
|
fqW|it|	ig|_}x|D]}|i|dqrW|S(NiiiRER>R#iR?Rs, (tfieldRRRRRLt
sort_arg_defst
sort_tuplet	sort_typet	connectorRIt
stats_listRR6R,R-R.R/R0R1tappendR3tsortt	TupleComptcomparettuple(RRMRIRWR-R.RNRQR1ROR,RRRR/R0((Rt
sort_statss0	09	
1
cCs|io|iin|S(N(RRtreverse(R((Rt
reverse_orders
cCs\|i}
h|_}d}
x|
iD]\}	\}}}}}t|	}tt||
jott|}
nh}x*|iD]\}}||t|<qW||jo*t|||||||f||<q)|||||f||<q)W|i}h|_}x|D]}	d|t|	<q#W|
|_d|_d|_|S(Ni(RRtoldstatstnewstatsRR6R,R-R.R/R0R1tfunc_strip_pathtnewfuncRR3t
newcallerstfunc2tcallerR8Rtold_toptnew_topRRR
(RR`RaRbR-R.R_R^R1R,RRcR0R[R/R\((Rt
strip_dirss2	




 	
			c
Cs|iodSnh|_}x|iiD]|\}\}}}}	}||joh||<nxC|iD]5\}}||joh||<n||||<qrWq/WdS(N(RR
RR6R,R-R.R/R0R1R`Ra(
RR`RaR-R.R
R1R,R/R0((Rtcalc_calleess




cCs^|}t|tdjoEg}x|D]0}ti|t|o|i|q,q,Wnt	|}t|tdjo@d|jo
djno"t||d}|| }nLt|tdjo2d|jo
|jno|}|| }nt	|t	|jo'|dt	|t	||f}n||fS(NRf1.0f0.0f0.5iis6   List reduced from %r to %r due to restriction <%r>
(
tlisttnew_listRtselR,tretsearchR3RSRtcounttinttmsg(RRhRfRmRkRgR,((Rteval_print_amounts"77'cCs|i}|io|i}d|id}n|ii}d}x)|D]!}|i|||\}}qNWt|}|pd|fSn|GH|t|ijoJd}xA|D]5}tt||jott|}qqWn|d|fS(Ns   Ordered by: s
s!   Random listing order was used
ii(RRtwidthRRfRPRmRtkeystsel_listt	selectionRnRRkR,R3(RRqRkRrRfRoR,Rm((Rtget_print_list3s(	

cGsx|iD]}|GHq
W|ioHndd}x |iD]}|Gt|GHq<W|G|iGdG|i|ijod|iGnd|i	GHH|i
|\}}|o.|ix|D]}|i|qWHHn|S(Nt isfunction callss(%d primitive calls)sin %.3f CPU seconds(RRR;tindentRR,tfunc_get_function_nameRRR
RstamountRoRftprint_titlet
print_line(RRwRuRfR;RoR,((Rtprint_statsKs.
	



cGs|i|\}}|or|i|i|dxO|D]G}||ijo|i	|||i|q=|i	||hq=WHHn|S(Ns	called...(
RRsRwRoRfRetprint_call_headingR,R
tprint_call_line(RRwRoRfR,((Rt
print_calleesas
c
Gsv|i|\}}|oV|i|dx=|D]5}|i|\}}}}	}|i
|||q3WHHn|S(Nswas called by...(RRsRwRoRfR{R,RR-R.R/R0R1R|(
RRwR-R.RfRoR1R,R/R0((Rt
print_callerspscCsdi||GHdS(Ns	Function (tljustt	name_sizetcolumn_title(RRR((RR{{scCst|i|G|p
dGHdSn|i}|i|d}d}xQ|D]I}t|}|||d||fGt|i
|dGHd}qTWdS(Ns--iRs(%r)iRt(R3tsourceRRt	call_dictRptclistRTRuR,RBtf8RR(RRRRRuRBRR,((RR|~s

1cCs
dGdGHdS(Ns-   ncalls  tottime  percall  cumtime  percallsfilename:lineno(function)((R((RRxscCs|i|\}}}}}t|}||jo|dt|}n|i
dGt|G|djoddGnt||Gt|G|djoddGnt||Gt|GHdS(Nt/i	iRti(
RRR,R-R.R/R0R1tstrtctrjustRR3(RR,RR-R.R1R/R0((RRys





cCsdS(N((R((Rtignores(t__name__t
__module__t__doc__R	RRRRR=RHRLRXRZRdReRnRsRzR}R~R{R|RxRyR(((RR*s0					
		
	
		 												RUcBs tZdZdZdZRS(sThis 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(tcomp_select_listR(RR((RR	scCs]xV|iD]K\}}||}||}||jo	|Sn||jo|Sq
q
WdS(Ni(RRtindext	directiontlefttltrighttr(RRRRRRR((RRVs



	
(RRRR	RV(((RRUs	cCs(|\}}}tii|||fS(N(t	func_nameR;R@RBR tpathtbasename(RR@RBR;((RR]scCs|dS(Ni(R,(R,((RRvscCsd|S(Ns	%s:%d(%s)(R(R((RR3scCsV|\}}}}}|\}
}}}}	||
||||||t|	|fS(s3Add together all the stats for two profile entries.N(
RR-R.R/R0R1ttargettt_cctt_nctt_tttt_ctt	t_callerstadd_callers(RRRR-R/R.RRR1RRR0((RR8scCs{h}x$|iD]\}}|||<qWxG|iD]9\}}||jo|||||<q:|||<q:W|S(s*Combine two caller lists in a single list.N(tnew_callersRR6R,RaR(RRRRaR,((RRs


cCs+d}x|iD]}||7}qW|S(s@Sum the caller statistics to get total number of calls received.iN(R.R1t
itervaluesR>(R1R.R>((Rtcount_callss
cCsd|S(Ns%8.3f(tx(R((RRst__main__tProfileBrowsercBstZddZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZRS(NcCsFtii|d|_|dj	ot||_n
d|_dS(Ns% (	tcmdtCmdR	RtprompttprofileRRR(RR((RR	s
	
cCs|i}g}x|D]}y|it|wWntj
onXyFt|}|djp
|djodGHwn|i|wWntj
onX|i|qW|iot|i||ndGHdS(Niis"Fraction argument mus be in [0, 1]sNo statistics object is loaded.(R@tsplitRt	processedttermRSRlt
ValueErrortfloattfracRRtgetattrtfn(RRR@RRRR((Rtgenerics.

cCs"dGHdGHdGHdGHdGHdGHdS(NsArguments may be:s0* An integer maximum number of entries to print.s:* A decimal fractional number between 0 and 1, controllings-  what fraction of selected entries to print.s8* A regular expression; only entries with function namess  that match it are printed.((R((Rtgeneric_helpscCs|ii|dS(Ni(RRRR@(RR@((Rtdo_add$scCs	dGHdS(Ns>Add profile info from given file to current statistics object.((R((Rthelp_add'scCs|id|S(NR}(RRR@(RR@((Rt
do_callees*scCsdGH|idS(Ns6Print callees statistics from the current stat object.(RR(R((Rthelp_callees,scCs|id|S(NR~(RRR@(RR@((Rt
do_callers0scCsdGH|idS(Ns6Print callers statistics from the current stat object.(RR(R((Rthelp_callers2scCs	dGHdS(NRi((RR@((Rtdo_EOF6scCs	dGHdS(NsLeave the profile brower.((R((Rthelp_EOF9scCsdS(Ni((RR@((Rtdo_quit<scCs	dGHdS(NsLeave the profile brower.((R((Rt	help_quit>scCs|oIyt||_Wn"tj
o}|dGHdSnX|d|_n-t|idjo|id}ndGHdS(Nis% iis1No statistics object is current -- cannot reload.i(R@RRRtIOErrorRRR(RR@R((Rtdo_readAs		cCs	dGHdS(Ns+Read in profile data from a specified file.((R((Rt	help_readNscCs|iidS(Ni(RRRZ(RR@((Rt
do_reverseQs
cCs	dGHdS(Ns/Reverse the sort order of the profiling report.((R((Rthelp_reverseTscCs|ii}|o7t|d|io|ii|in9dGHx0ti	i
D]\}}d||dfGHqbWdS(NcCs
||jS(N(Rta(RR((Rt<lambda>Yss/Valid sort keys (unique prefixes are accepted):s%s -- %sii(
RRRLtabbrevsR@tfilterRRXRRHR6tkeytvalue(RR@RRR((Rtdo_sortWs$cCsdGHdGHdS(Ns.Sort profile data according to specified keys.s3(Typing `sort' without arguments lists valid keys.)((R((Rt	help_sort`scGs6g}tiD]!}|i|o||qq~S(N(t_[1]RRHRt
startswithttext(RRRRR((Rt
complete_sortcscCs|id|S(NRz(RRR@(RR@((Rtdo_statsfscCsdGH|idS(Ns.Print statistics from the current stat object.(RR(R((Rt
help_statshscCs|iidS(Ni(RRRd(RR@((Rtdo_stripls
cCs	dGHdS(Ns<Strip leading path information from filenames in the report.((R((Rt
help_striposcCs|o|SndS(N(tstopR(RRR@((Rtpostcmdrs(RRRR	RRRRRRRRRRRRRRRRRRRRRRRR(((RRs2													
											s*Welcome to the profile statistics browser.isGoodbye.(RR R#RRit__all__RRUR]RvR3R8RRRRRtreadlinetImportErrorRRtsysRtargvtinitprofileRtcmdlooptKeyboardInterrupt(RRRR8RR]RiRRURvRRRRRR#R RR3((Rt?s@"					~								
	
|		

Anon7 - 2021