ó ŸçƒQc@sddlZddlmZmZddgZd„Zdefd„ƒYZiZd„Z e dkrddl Z ej d e_ ej sªej d IJejd ƒnejjd e jje jjej 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.pytstreversecs 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| j rdx™| j D]‹} |j|| j| j| j| jd t | j ƒfƒ|d 7}| d 7} |d k rS||krSd S|d k rä| |kräPqäqäWqdqdWd 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çtt|jƒƒD]Ð}|j|}t|jtƒskt|ƒt|jƒf|dƒ|j|s %s:%d(%s)(R5R6t_fn2modt co_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