config root man

Current Path : /usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/profile.pyo

³ò
h”Rc
@sVdZddkZddkZddkZddkZddklZddddgZedd„Z	ed	„Z
d
„Zeidjoddk
Z
e
id„Zneed
ƒoeid„ZndZy+ddkZd„Zed„ZdZWnej
onXdfd„ƒYZd„Zd„ZedjoeƒndS(s Class for profiling Python code.iÿÿÿÿN(tOptionParsertruntrunctxthelptProfilecCsatƒ}y|i|ƒ}Wntj
onX|dj	o|i|ƒn|i|ƒSdS(sRun 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.
    N(RRt
SystemExittNonet
dump_statstprint_stats(t	statementtfilenametsorttprof((s#/usr/local/lib/python2.5/profile.pyR9s	
cCsdtƒ}y|i|||ƒ}Wntj
onX|dj	o|i|ƒn|iƒSdS(s·Run statement under profiler, supplying your own globals and locals,
    optionally saving results in filename.

    statement and filename have the same semantics as profile.run
    N(RRRRRR(R	tglobalstlocalsR
R((s#/usr/local/lib/python2.5/profile.pyRNs	
cCsdGHdGHdS(Ns2Documentation for the profile module can be found s?in the Python Library Reference, section 'The Python Profiler'.((((s#/usr/local/lib/python2.5/profile.pyR`stmaccCs|ƒdS(NgN@((ttimer((s#/usr/local/lib/python2.5/profile.pyt
_get_time_macfsttimescCs|ƒ}|d|dS(Nii((Rtt((s#/usr/local/lib/python2.5/profile.pyt_get_time_timesjs	icCstitiƒS((tresourcet	getrusagetRUSAGE_SELF(((s#/usr/local/lib/python2.5/profile.pyt<lambda>uscCs|ƒ}|d|dS(Nii((RR((s#/usr/local/lib/python2.5/profile.pyt_get_time_resourcevs	icBs?eZdZdZd"d"d„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
hed<e
d<e
d
<ed<e
d<e
d<Zd„Zdd#d„ƒYZdd$d„ƒYZd„Zd„Zdd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd „Zd!„ZRS(%sProfiler 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.
    icCsèh|_d|_d|_d|_|djo
|i}n||_|péto"t|_|i	|_
t|_qÈt
idjo%ti|_|i|_
t|_qÈttdƒo#ti|_|_|i|_
qÈtt
dƒo%t
i|_|i	|_
t|_qÈti|_|_|i|_
n’||_|iƒ}yt|ƒ}Wn(tj
o||_|i|_
nCX|djo|i	|_
n
|i|_
|td„}||_|iƒ|_|idƒdS(NtRtclockRicSs
||ƒƒS(N((Rtsum((s#/usr/local/lib/python2.5/profile.pytget_time_timerÕstprofiler(ttimingsRtcurtcmdtc_func_nametbiast_has_restresgetrusageRttrace_dispatcht
dispatcherRtget_timetostnametMacOStGetTicksttrace_dispatch_macRthasattrttimeRttrace_dispatch_iRRtlent	TypeErrorttrace_dispatch_lRRt
simulate_call(tselfRR#RtlengthR((s#/usr/local/lib/python2.5/profile.pyt__init__¦sN				

		


		
	cCs±|i}|ƒ}|d|d|i|i}|djo|i|_n|i||||ƒo"|ƒ}|d|d|_n#|ƒ}|d|d||_dS(Niitc_call(RRR#t__name__R"tdispatch(R5tframeteventtargRRtr((s#/usr/local/lib/python2.5/profile.pyR&Ýs		 
		cCs{|i}|ƒ|i|i}|djo|i|_n|i||||ƒo|ƒ|_n|ƒ||_dS(NR8(RRR#R9R"R:(R5R;R<R=RR((s#/usr/local/lib/python2.5/profile.pyR0ïs	
cCs‡|i}|ƒd|i|i}|djo|i|_n|i||||ƒo|ƒd|_n|ƒd||_dS(NgN@R8(RRR#R9R"R:(R5R;R<R=RR((s#/usr/local/lib/python2.5/profile.pyR-þs	
cCs{|i}|ƒ|i|i}|djo|i|_n|i||||ƒo|ƒ|_n|ƒ||_dS(NR8(R(RR#R9R"R:(R5R;R<R=R(R((s#/usr/local/lib/python2.5/profile.pyR3s	
c	Csf|i\}}}}}}||j	o|o|i||ƒSn|||||||f|_dS(Ni(R ttrace_dispatch_return(	R5R;Rtrpttrittrettrfntrframetrcur((s#/usr/local/lib/python2.5/profile.pyttrace_dispatch_exceptions
cCs|io]|i|idj	oF|i\}}}}}}t|tiƒp|i|dƒqgn|i}	|	i|	i|	i	f}
|dd|
||if|_|i
}|
|jo:||
\}}
}}}||
d|||f||
<nddddhf||
<dS(Niþÿÿÿii(R tf_backt
isinstanceRt
fake_frameR?tf_codetco_filenametco_firstlinenotco_nameR(R5R;RR@RARBRCRDREtfcodetfnRtcctnsttttcttcallers((s#/usr/local/lib/python2.5/profile.pyttrace_dispatch_call's!		
!c
Cs dd|if}|dd|||if|_|i}|i|ƒo:||\}}}}}	||d|||	f||<nddddhf||<dS(NRii(R"R Rthas_key(
R5R;RRORRPRQRRRSRT((s#/usr/local/lib/python2.5/profile.pyttrace_dispatch_c_call=s	!cCs,||idj	o|i|iddƒn|i\}}}}}}||}||}|\}	}
}}}
}|	|
|||||
|f|_|i}||\}}}}}|p||}|d}n||jo||d||<nd||<||d||||f||<dS(Niþÿÿÿii(R R?R(R5R;RR@RARBRCREtframe_totaltppttpittpettpfntpframetpcurRRPRQRRRSRT((s#/usr/local/lib/python2.5/profile.pyR?Hs"

#	


!tcallt	exceptiontreturnR8tc_exceptiontc_returncCs0|idodSn||_|i|ƒdS(Niÿÿÿÿ(R R!R4(R5R!((s#/usr/local/lib/python2.5/profile.pytset_cmd~s	t	fake_codecBseZd„Zd„ZRS(cCs(||_||_||_d|_dS(Ni(RKtco_lineRMRL(R5R
tlineR*((s#/usr/local/lib/python2.5/profile.pyR7„s			cCst|i|i|ifƒS(N(treprRKRfRM(R5((s#/usr/local/lib/python2.5/profile.pyt__repr__Šs(R9t
__module__R7Ri(((s#/usr/local/lib/python2.5/profile.pyReƒs	RIcBseZd„ZRS(cCs||_||_dS(N(RJRG(R5tcodetprior((s#/usr/local/lib/python2.5/profile.pyR7Žs	(R9RjR7(((s#/usr/local/lib/python2.5/profile.pyRIscCsc|idd|ƒ}|io|id}nd}|i||ƒ}|id||dƒdS(NtprofileiiþÿÿÿR_(ReR RRIR:(R5R*RkR]R;((s#/usr/local/lib/python2.5/profile.pyR4’s
cCsg|i}|ƒ|i}x7|ido(|id||id|ƒd}qW|ƒ||_dS(NiÿÿÿÿRaiþÿÿÿi(R(RR R:(R5R(R((s#/usr/local/lib/python2.5/profile.pytsimulate_cmd_completežs	iÿÿÿÿcCs2ddk}|i|ƒiƒi|ƒiƒdS(Niÿÿÿÿ(tpstatstStatst
strip_dirst
sort_statsR(R5RRo((s#/usr/local/lib/python2.5/profile.pyR©scCs:t|dƒ}|iƒti|i|ƒ|iƒdS(Ntwb(topentcreate_statstmarshaltdumptstatstclose(R5tfiletf((s#/usr/local/lib/python2.5/profile.pyR®s
cCs|iƒ|iƒdS(N(Rntsnapshot_stats(R5((s#/usr/local/lib/python2.5/profile.pyRu´s
c	Cs‹h|_x{|iiƒD]j\}\}}}}}|iƒ}d}x|iƒD]}||7}qSW|||||f|i|<qWdS(Ni(RxRt	iteritemstcopyt
itervalues(	R5tfuncRPRQRRRSRTtnctcallcnt((s#/usr/local/lib/python2.5/profile.pyR|¸s	
cCs(ddk}|i}|i|||ƒS(Niÿÿÿÿ(t__main__t__dict__R(R5R!Rƒtdict((s#/usr/local/lib/python2.5/profile.pyRÅs	cBs@|i|ƒei|iƒz|||UWdeidƒX|S(N(Rdtsyst
setprofileR'R(R5R!R
R((s#/usr/local/lib/python2.5/profile.pyRÊs
cOsI|it|ƒƒti|iƒz|||ŽSWdtidƒXdS(N(RdRhR†R‡R'R(R5R€targstkw((s#/usr/local/lib/python2.5/profile.pytruncallÔs
cCsW|itj	otdƒ‚n|i}d|_z|i||ƒSWd||_XdS(Ns&Subclasses must override .calibrate().i(t	__class__RR2R#t_calibrate_inner(R5tmtverboset
saved_bias((s#/usr/local/lib/python2.5/profile.pyt	calibrates		cCs‰|i}d„}|d„}||ƒ|ƒ}||ƒ|ƒ}||}|o
dG|GHntƒ}	|ƒ}|	idtƒtƒƒ|ƒ}||}
|o
dG|
GHnd}d}xZ|	iiƒD]I\\}
}}\}}}}}|djo||7}||7}qÐqÐW|od	G|GHd
G|GHn||djotd|ƒ‚n||d
|}|o
dG|GHn|S(NcSs!xt|ƒD]}d}q
WdS(Ni(trange(tntitx((s#/usr/local/lib/python2.5/profile.pytf1s
cSs%xt|ƒD]}|dƒq
WdS(Nid(R‘(RR•R“((s#/usr/local/lib/python2.5/profile.pyR{s
s elapsed time without profiling =sf(m)selapsed time with profiling =gR{R•s!'CPU seconds' profiler reported =stotal # calls =is internal error: total calls = %dg@s+mean stopwatch overhead per profile event =(R{sf1(R(RRR
RRtitemst
ValueError(R5RRŽR(R•R{tt0tt1telapsed_noprofiletptelapsed_profilettotal_callst
reported_timeR
RgtfuncnameRPRQRRRSRTtmean((s#/usr/local/lib/python2.5/profile.pyRŒsD		
	
	

			


$

	

N(((R9Rjt__doc__R#RR7R&R0R-R3RFRURWR?R:RdReRIR4RnRRRuR|RRRŠRRŒ(((s#/usr/local/lib/python2.5/profile.pyR}s@%7								&					
	
					
		
	1cGs	dGHdS(Ns7Report generating functions are in the "pstats" module((Rˆ((s#/usr/local/lib/python2.5/profile.pyRpOsc	Csd}td|ƒ}t|_|iddddddd	dƒ|id
ddddd
d	dƒtidp|iƒtidƒn|i	ƒ\}}|ti(t
tiƒdjoNtiidt
iitidƒƒtdtidf|i|iƒn|iƒ|S(Ns?profile.py [-o output_file_path] [-s sort] scriptfile [arg] ...tusages-os	--outfiletdesttoutfileRsSave stats to <outfile>tdefaults-ss--sortRs?Sort order when printing to stdout, based on pstats.Stats classiÿÿÿÿiiisexecfile(%r)(RtFalsetallow_interspersed_argst
add_optionRR†targvtprint_usagetexitt
parse_argsR1tpathtinsertR)tdirnameRR¤R(R¢tparsertoptionsRˆ((s#/usr/local/lib/python2.5/profile.pytmainRs"	



&(
Rƒ(R¡R†R)R/RvtoptparseRt__all__RRRRR*R+R,RR.RRR$RR%RtImportErrorRRpR²R9(((s#/usr/local/lib/python2.5/profile.pys<module>s8		
ÿÓ		


Man Man