Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/lsprof.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��c@sddlZddlmZmZddgZd�Zdefd��YZiZd�Z	e
dkrddlZejd	e_ejs�ej
d
IJejd�nejjdejjejjejd���eeejde�e��Zej�ej�ndS(
i�N(tProfilertprofiler_entrytprofiletStatscOsNt�}|jdtdt�z|||�Wd|j�Xt|j��S(s
XXX docstringtsubcallstbuiltinsN(RtenabletTruetdisableRtgetstats(tftargstkwdstp((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyRs	cBsAeZdZd�Zdd�Zddddd�Zd�ZRS(s
XXX docstringcCs
||_dS(N(tdata(tselfR((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyt__init__st
inlinetimecs��tjkr"td���n|jjd�fd�dt�x?|jD]4}|jrN|jjd�fd�dt�qNqNWdS(s
XXX docstringsCan't sort by %stkeycs
t|��S(N(tgetattr(tx(tcrit(s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyt<lambda>streversecs
t|��S(N(R(R(R(s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyRsN(Rt__dict__t
ValueErrorRtsortRtcalls(RRte((Rs4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyRs"	c
Cs~|d
krtj}n|j}|d
k	r:|| }nd}d}|j|d�d}x|D]}	|j||	j|	j|	j|	jt	|	j
�f�|d	7}|d
k	r�||kr�d
Sd}
|rd|	jrdx�|	jD]�}|j||j|j|j|jdt	|j
�f�|d	7}|
d	7}
|d
k	rS||krSd
S|d
k	r�
|kr�q��qdqdWd
S(
s
XXX docstrings% 12s %12s %11.4f %11.4f   %s
s% 12s %12s %12s %12s %s
t	CallCountt	RecursivesTotal(s)s	Inline(s)smodule:lineno(function)iiNs    %s(RRsTotal(s)s	Inline(s)smodule:lineno(function)(tNonetsyststdoutRtwritet	callcounttreccallcountt	totaltimeRtlabeltcodeR(RttoptfiletlimittclimittdtcolsthcolstcountRtccounttse((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pytpprint s8	
	



cCs�x�t|j��D]�}|j|}t|jt�skt|�t|j�f|d�|j|<n|jrxott|j��D]U}|j|}t|jt�s�t|�t|j�f|d�|j|<q�q�WqqWdS(swReplace all references to code objects with string
        descriptions; this makes it possible to pickle the instance.iN(	trangetlenRt
isinstanceR'tstrttypeR&R(RtiRtjR1((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pytfreeze?s
0	
N(t__name__t
__module__t__doc__RRRR2R:(((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyRs
		cCs�t|t�r|Syt|j}Wn�tk
r�x�ttjj��D]i\}}|dkrhqJntt
|dd�t�s�qJn|jj|j�rJ|}t|j<PqJqJWd|j}t|j<nXd||j
|jfS(Nt__file__s<%s>s	%s:%d(%s)(R5R6t_fn2modtco_filenametKeyErrortlistR tmodulest	iteritemsRRR>t
startswithtco_firstlinenotco_name(R'tmnametktv((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyR&Ps
"t__main__is(usage: lsprof.py <script> <arguments...>ii(R t_lsprofRRt__all__RtobjectRR?R&R;tostargvtstderrtexittpathtinserttabspathtdirnametexecfiletglobalstlocalststatsRR2(((s4/sys/lib/python2.7/site-packages/mercurial/lsprof.pyt<module>s 	=		
2"


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.