HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib64/python2.7/site-packages/mercurial/statprof.pyo
�
1�3\c@`s�dZddlmZmZmZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZmZejZejZdddd	d
gZddd
dddddddddddhZd�Zdefd��YZe�Zdefd��YZdefd��YZd �Ze
j�Zd!�Zd"�Z da"d#d$d%�Z#d&�Z$d'�Z%d(�Z&dd)�Z'ed*��Z(d+efd,��YZ)d-d?d.��YZ*dd/dd0�Z+d1�Z,d2�Z-dd3�Z.d4d5�Z/ddd6�Z0iZ1d7�Z2d8�Z3d9d:d;�Z4d<�Z5dd=�Z6e7d>kr�ej8e6��ndS(@s�

statprof is intended to be a fairly simple statistical profiler for
python. It was ported directly from a statistical profiler for guile,
also named statprof, available from guile-lib [0].

[0] http://wingolog.org/software/guile-lib/statprof/

To start profiling, call statprof.start():
>>> start()

Then run whatever it is that you want to profile, for example:
>>> import test.pystone; test.pystone.pystones()

Then stop the profiling and print out the results:
>>> stop()
>>> display()
  %   cumulative      self
 time    seconds   seconds  name
 26.72      1.40      0.37  pystone.py:79:Proc0
 13.79      0.56      0.19  pystone.py:133:Proc1
 13.79      0.19      0.19  pystone.py:208:Proc8
 10.34      0.16      0.14  pystone.py:229:Func2
  6.90      0.10      0.10  pystone.py:45:__init__
  4.31      0.16      0.06  pystone.py:53:copy
    ...

All of the numerical data is statistically approximate. In the
following column descriptions, and in all of statprof, "time" refers
to execution time (both user and system), not wall clock time.

% time
    The percent of the time spent inside the procedure itself (not
    counting children).

cumulative seconds
    The total number of seconds spent in the procedure, including
    children.

self seconds
    The total number of seconds spent in the procedure itself (not
    counting children).

name
    The name of the procedure.

By default statprof keeps the data collected from previous runs. If you
want to clear the collected data, call reset():
>>> reset()

reset() can also be used to change the sampling frequency from the
default of 1000 Hz. For example, to tell statprof to sample 50 times a
second:
>>> reset(50)

This means that statprof will sample the call stack after every 1/50 of
a second of user + system time spent running on behalf of the python
process. When your process is idle (for example, blocking in a read(),
as is the case at the listener), the clock does not advance. For this
reason statprof is not currently not suitable for profiling io-bound
operations.

The profiler uses the hash of the code object itself to identify the
procedures, so it won't confuse different procedures with the same name.
They will show up as two different rows in the output.

Right now the profiler is quite simplistic.  I cannot provide
call-graphs or other higher level information.  What you see in the
table is pretty much all there is. Patches are welcome :-)


Threading
---------

Because signals only get delivered to the main thread in Python,
statprof only profiles the main thread. However because the time
reporting function uses per-process timers, the results can be
significantly off if other threads' work patterns are not similar to the
main thread's work patterns.
i(tabsolute_importtdivisiontprint_functionNi(tencodingtpycompattstarttstoptresettdisplaytprofiles
util.py:checksextensions.py:closurescolor.py:colorcmdsdispatch.py:checkargssdispatch.py:<lambda>sdispatch.py:_runcatchsdispatch.py:_dispatchsdispatch.py:_runcommandspager.py:pagecmdsdispatch.py:runsdispatch.py:dispatchsdispatch.py:runcommandshg.py:<module>sevolve.py:warnobserrorscC`s&tj�}|d|d|dfS(Niii(tosttimes(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytclock�stProfileStatecB`sAeZdd�Zdd�Zd�Zd�Zed��ZRS(cC`s|j|�d|_dS(Ntcpu(Rttrack(tselft	frequency((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt__init__�s
cC`sbd|_d|_|r(d||_nt|d�sCd|_nd|_d|_g|_dS(Ngg�?tsample_intervalg@�@i(ggg����MbP?(taccumulated_timetNonetlast_start_timeRthasattrtremaining_prof_timet
profile_leveltsamples(RR((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s				cC`s[|d|jd|d|jdf}|jd|d|jd|df|_dS(Nii(RR(Rt	stop_timet	increment((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytaccumulate_time�scC`s|j|jt|j�S(N(RttimeidxtlenR(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytseconds_per_sample�scC`s|jdkrdSdS(Ntrealii(R(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�sN(	t__name__t
__module__RRRRR tpropertyR(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR
�s
	
	tCodeSitecB`sYeZiZdZd�Zd�Zd�Zed��Zd�Z	d	�Z
d
�ZRS(upathulinenoufunctionusourcecC`s(||_||_||_d|_dS(N(tpathtlinenotfunctionRtsource(RR&R'R(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s			cC`s5y&|j|jko$|j|jkSWntSXdS(N(R'R&tFalse(Rtother((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt__eq__�s
cC`st|j|jf�S(N(thashR'R&(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt__hash__�scC`sS||f}y|j|SWn1tk
rN||||�}||j|<|SXdS(N(tcachetKeyError(tclsR&R'R(tktv((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytget�s

cC`s�|jdkr�|jd}d}z]yOt|j�}x9t|�D]+\}}||krD|j�|_PqDqDWWnnXWd|r�|j�nX|jdkr�d|_q�n|j}t|�|kr�||d d}n|S(Nitis...(	R)RR'topenR&t	enumeratetstriptcloseR(RtlengthR'tfptitlineR)((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt	getsource�s(
	cC`stjj|j�S(N(R
R&tbasename(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytfilenamescC`sd|j�|jfS(Ns%s:%s(R@R((R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytskipnames(upathulinenoufunctionusource(R"R#R/t	__slots__RR,R.tclassmethodR4R>R@RA(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR%�s			
		tSamplecB`s&eZdZd�Zed��ZRS(ustackutimecC`s||_||_dS(N(tstackttime(RRERF((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR
s	cC`sTg}x>|rF|jtj|jj|j|jj��|j}q	Wt||�S(N(	tappendR%R4tf_codetco_filenametf_linenotco_nametf_backRD(R1tframeRFRE((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt
from_frames	
(ustackutime(R"R#RBRRCRN(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyRDs	cC`sztjdkrvt�}tj|�tjtj}tjjtj	||��t
jt
jtj
d�|t_ndS(Nig(tstateRRRRRRRGRDRNtsignalt	setitimertITIMER_PROFRR(tsignumRMtnowt	timestamp((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytprofile_signal_handlers	

cC`s�x{tj�s}t�}tj|�tj�|}tjtj}tj	j
tj||��|t_
tjtj�qWtj�dS(N(t
stopthreadtis_setRRORtsyst_current_framesRRRRGRDRNRRFtsleepRtclear(ttidRTRMRU((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt
samplerthread)s	
	cC`s
tjdkS(Ni(ROR(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt	is_active;stthreadRcC`s|t_tjd7_tjdkrt�t_tj}d
t_|a|dkr�tjtj	t
�tjtj|p�tj
d�q|dkrtj�}gtj�j�D]\}}||kr�|^q�d}tjdtd|fdd	�t_tjj�qnd
S(s:Install the profiling signal handler, and start profiling.iRPgR`ittargettargstnameR^N(RORRRRRRt
lastmechanismRPtSIGPROFRVRQRRRtinspecttcurrentframeRYRZtitemst	threadingtThreadR^R`R(t	mechanismRtrptRMR2tfR]((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR?s"			;cC`s�tjd8_tjdkr�tdkrhtjtjdd�}tjtjtj�|dt_n&tdkr�t	j
�tjj�ntj
t��dt_tjjd�}|r�t|�q�ntS(s;Stop profiling, and uninstall the profiling signal handler.iiRPgR`t
STATPROF_DESTN(RORRdRPRQRRRetSIG_IGNRRWtsetR`tjoinRRRRRtenvironR4t	save_data(Rltstatprofpath((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyRVs
	cC`s�t|d���}|jdtj�x{tjD]p}|j}|j}g|D]+}dj|jd|j	|j
g�^qO}|jd|dj|�f�q0WWdQXdS(Nsw+s%f %f
ss%ds%d%s
s(R6twriteRORRRFRERqR&R'R((R&tfiletsampleRFREtstsites((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyRsjs		5c
C`s�t|d�j�j�}g|dj�D]}t|�^q,t_gt_x�|dD]�}|jd�}t|d�}|d}g}xK|D]C}|jd�}	|jt	j
|	dt|	d�|	d��q�Wtjjt||��q[WdS(Ntriissi(
R6treadt
splitlinestsplittfloatRORRRGR%R4tintRD(
R&tlinestvalueR=tpartsRFtrawsitesRytrawsitet	siteparts((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt	load_datats,	

 cC`stjj�tj|�dS(s�Clear out the state of the profiler.  Do not call while the
    profiler is running.

    The optional frequency argument specifies the number of samples to
    collect per second.N(R%R/R\ROR(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s
cc`s&t�z	dVWdt�t�XdS(N(RRR(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR	�s
	t	SiteStatscB`sVeZd�Zd�Zd�Zd�Zd�Zd�Zd�Ze	d��Z
RS(cC`s||_d|_d|_dS(Ni(tsitet	selfcountt
totalcount(RR�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s		cC`s|jd7_dS(Ni(R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytaddself�scC`s|jd7_dS(Ni(R�(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytaddtotal�scC`s|jttj�dS(Nid(R�RROR(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytselfpercent�scC`s|jttj�dS(Nid(R�RROR(R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyttotalpercent�scC`s|jtj�S(N(R�ROR (R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytselfseconds�scC`s|jtj�S(N(R�ROR (R((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyttotalseconds�scC`s�i}x|D]w}xnt|j�D]]\}}|j|�}|s]t|�}|||<n|j�|dkr#|j�q#q#Wq
Wg|j�D]}|^q�S(Ni(R7RER4R�R�R�t
itervalues(R1RtstatsRwR<R�tsitestatRx((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt
buildstats�s


(R"R#RR�R�R�R�R�R�RCR�(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s							tDisplayFormatscB`s2eZdZdZdZdZdZdZdZRS(iiiiiii(	R"R#tByLinetByMethodtAboutMethodtHotpatht
FlameGraphtJsontChrome(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��sicK`s�|dkrt}n|dkr9ddl}|j}nt|j�dkr_|jd�dS|tjkr~t	||�n�|tj
kr�t||�n�|tjkr�t
|||�n�|tjkr�t|||�no|tjkrt|||�nM|tjkr"t||�n.|tjkrDt|||�ntd��|tjtjfkr�|jd�|jdt|j��|jd|j�ndS(s<Print statistics, either to stdout or the given file object.iNsNo samples recorded.
sInvalid display formats---
sSample count: %d
s!Total time: %f seconds (%f wall)
(RRORYtstdoutRRRuR�R�tdisplay_by_lineR�tdisplay_by_methodR�tdisplay_about_methodR�tdisplay_hotpathR�twrite_to_flameR�t
write_to_jsonR�twrite_to_chromet	ExceptionR(R;tformattdatatkwargsRY((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s6	

cC`s�tj|j�}|jdtdd��|jdd�|jd	d�xw|D]o}|j}d
tj|j	��|j
tj|j�f}|jd|j
�|j�|j�|f�qTWdS(ssPrint the profiler data with each sample line represented
    as one row in a table.  Sorted by self-time per line.treversetkeycS`s
|j�S(N(R�(tx((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt<lambda>�R5s%5.5s %10.10s   %7.7s  %-8.8s
s%  t
cumulativeRR5s%5.5s  %9.9s  %8.8s  %-8.8s
RFtsecondsRcs%s:%d:%ss%6.2f %9.2f %9.2f  %s
N(s%  R�RR5(RFR�R�Rc(R�R�RtsorttTrueRuR�RtfsencodeR@R'tsysbytesR(R�R�R�(R�R;R�tstatR�t	sitelabel((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s		
		c	C`sG|jdd�|jdd�tj|j�}tt�}x6|D].}||jj�d
|jjj	|�qGWg}x�|j
�D]{\}}d}d}	d}
x>|D]6}||j�7}|	|j�7}	|
|j
�7}
q�W|j	|||	|
|f�q�W|jdtd
d��x|D]}|ddkrGq+n|jd|d|d|dtj|d�f�|djdtd
d��x�|dD]�}|j
�dkr�|jjd�}tjjdkrt|t�rtj|�}n|j
�|j�|jj|f}
|jd|
�q�q�Wq+WdS(s�Print the profiler data with each sample function represented
    as one row in a table.  Important lines within that function are
    output as nested rows.  Sorted by self-time per line.s%5.5s %10.10s   %7.7s  %-8.8s
s%  R�RR5s%5.5s  %9.9s  %8.8s  %-8.8s
RFR�Rct:iR�R�cS`s|dS(Ni((R�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�)R5ig�������?s%6.2f %9.2f %9.2f  %s
iiicS`s
|j�S(N(R�(R<((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�4R5is%33.0f%% %6.2f   line %d: %s
N(s%  R�RR5(RFR�R�Rc(RuR�R�RtdefaultdicttlistR�R@R(RGt	iteritemsR�R�R�R�R�RR�R>RYtversion_infotmajort
isinstancetbytestbytestrR'(R�R;R�tgroupedR�tfunctiondatatfnamet	sitestatst
total_cum_secttotal_self_sect
total_percentR(R)t	stattuple((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�sP		
,
	
	"c
K`s�|dkrtd��nd}d|krE|jd�\}}nd}i}i}x�|jD]�}x�t|j�D]�\}	}
|
j|krw|s�|
j�|krw|d7}|	t|j�dkr
|j|	d}||kr||d||<q
d||<n|
|kr.||
d||
<q;d||
<qwqwWqaWg|j	�D]\}}||f^qP}|j
dtdd��xl|D]d\}}|jd||d	t
j|j��t
j|j�|jt
j|jd
��f�q�Wtj|j�}
g|
D]:}|jj|kr|sC|jj�|kr|^q}
d}d}d}d}xN|
D]F}||j�7}||j�7}||j�7}||j�7}qnW|jdt
j|p�d�t
j|�||||f�g|j	�D]\}}||f^q}|j
dtdd
��xK|D]C\}}|jd||d	|jt
j|jd
��f�q>WdS(NsInvalid functionR�iiR�R�cS`s|dS(Ni((R�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�_R5s%6.2f%%   %s:%s   line %s: %s
idi2sA
    %s:%s    Total: %0.2fs (%0.2f%%)    Self: %0.2fs (%0.2f%%)

t___cS`s|dS(Ni((R�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��R5s        %6.2f%%   line %s: %s
(RR�R}RR7RER(R@RR�R�R�RuRR�R�R'R>R�R�R�R�R�R�R�(R�R;R(R�R@trelevant_samplestparentstchildrenRwR<R�tparenttcountR�RxR�R�ttotal_self_percentttotal_cum_percentR�tchild((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�Asr

+	!
(
+	g�������?c`s�dtf�fd��Y��d��|jdj}xA|jD]6}�j|jddd�|j|�|j}qBW����fd���jdkr���dt�ndS(NtHotNodec`s eZd�Z�fd�ZRS(cS`s||_d|_i|_dS(Ni(R�R�R�(RR�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s		c`s�|j|7_|d}|jj|�}|sM�|�}||j|<nt|�dkr�d}x6|t|�kr�||j�tkr�|d7}qhW|t|�kr�|j|||�q�ndS(Nii(R�R�R4RRAtskipstadd(RRERFR�R�R<(R�(s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s
+(R"R#RR�((R�(s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s	ii����c`sE|j}g|jj�D]"}|j��jkr|^q}|r�|dd}d}d}t|j�dkr�t|jj��dj}	|	j�djd�}|	j}ndj|�|r�dndd	}
|
|j�jd
||f}dt	dt|��d
}|d|j
|jd�f}
||
}tg|jj�D]}|j^qU�}|j|d�jkr�d|d}n$|j|dkr�d|d}n�j
|d�n|}t|�dks�|r�|d7}n|jdtdd��x*|D]"}�||t|�dk�qWdS(NiiR5iR�is\t|s %4.1f%%  %s %sidt%i7s	s %s:  %sR=ig�������?ssss
R�R�cS`s|jS(N(R�(R�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��R5(R�R�R�R�RR�R@tljustR(tstrR'R>tsumRuR�R�(tnodetdepthtmultiple_siblingsR�tctvisiblechildrentindentR@R(t	childsitetlistpatternt
liststringtcodepatternt
codestringtfinalstringtchildrensamplestnewdepthR�(t_writeR;tlimittroot(s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s<	"

+

(tobjectRRRFR�RER�R*(R�R;R�R�tlasttimeRw((R�R�R;R�R�s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s'
(cK`sq|dkr tjdd}ntjj|�sT|jd|�|jd�dStj�\}}t	|d�}i}xt|j
D]i}	g|	jD]}
|
j^q�}|j
�dj|�}||kr�||d||<q�d||<q�Wx1|j�D]#\}}
|jd||
f�q�W|j�|dkrEd	}ntjd
||f�|jd|�dS(NtHOMEs/flamegraph.plserror: missing %s
s8get it here: https://github.com/brendangregg/FlameGraph
sw+t;is%s %d
s~/flamegraph.svgsperl ~/flamegraph.pl %s > %ssWritten to %s
(RRRrR
R&texistsRuRtmkstempR6RRER(R�RqR�R9tsystem(R�R;t
scriptpatht
outputfileR�tfdR&RvR�RwRxRyR=R�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR��s.


	cC`s�|tkrt|Stjtj�jtjd�d}xH|gtj	D]6}|tj}|j
|�rJ|t|�}PqJqJW|t|<|S(s�Attempt to make the path to a Python module easier to read by
    removing whatever part of the Python search path it was found
    on.ii(t
_pathcacheRR�Rt__file__trsplitR
tsepRYR&t
startswithR(R&thgpathtptprefix((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytsimplifypath�s%

cC`s�g}x`|jD]U}g}x0|jD]%}|j|j|j|jf�q&W|j|j|f�qWtj|�}t	|t
�s�|jd�}n|j|�dS(Nsutf-8(
RRERGR&R'R(RFtjsontdumpsR�R�tencodeRu(R�R;RRwRERM((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�s#g{�G�zt?g+����?c`s�g�tj��tj��i�	g���	�
fd��
d�}d�t��|jdj|jdj}|��t|�������������
f	d�}xg|jD]\��jd}|j}t|j	�}	t
d��jD��}
tj|
�}�|kr(q�nx8�rb|rb�d|dkrb�j�|j�q+Wx�rv|�qfWx�t|�D]�}�j
�jt��f��j
|�|\}	}�
t
���}
�jtdd	d
|d|	d�jd
d|
dd��q�Wtj|
��q�Wx�r6|�q&Wgt��D] }|d�krD|d^qD}tjd�t��D��}tjtd|d|�|dd�|jd�dS(Nc`s�|s
dS|�kr�|S�|d�}t��}|�|<�jtd|dddd|d��|dk	r��djd|�n|S(NitcategoryiRcs%s %si����R�(RRGtdictRtupdate(RER�tmyid(tid2stacktstack2idtstackid(s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyRs
,cS`s!t|�t|�t|�kS(N(R�R(tatb((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytendswith,sg����MbP?i����ic`s��t���}�j�\}}�j�\}}�j|}�|koZ�knr�t|��j�}�jtddd|d|d|d|ddd	��n
�j|�dS(
NtphtERctcattsfttsg��.Atpidi(ttupletpopleftRFtmaxRGR�R�(toldsidtoldcattoldfunctoldtimetoldidxtdurationt
sampletime(	t	blacklisttclamptlastseent	laststacktmaxthresholdtminthresholdRwRR(s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytpoplastEs
$cs`s4|]*}dt|j�|jf|jfVqdS(s%s:%dN(R�R&R'R((t.0RM((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pys	<genexpr>YsRtBRcR
Rg��.ARR
ics`s'|]\}}t|�|fVqdS(N(R�(RR2R3((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pys	<genexpr>nsttraceEventststackFramesR�s
(tcollectionstdequeRpRRFRRER(R�R&Rtpoptreversedt
appendleftRRGR�R7tOrderedDictR�tdumpRu(R�R;RRRt	totaltimeRttosRcR&REtqstackRmtsidRxteventstframes((RRRRRRRRwRRRs8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyR�sT
			
'
		#
	
+	3%cC`std�dS(Ns�
The statprof command line allows you to inspect the last profile's results in
the following forms:

usage:
    hotpath [-l --limit percent]
        Shows a graph of calls with the percent of time each takes.
        Red calls take over 10%% of the total time themselves.
    lines
        Shows the actual sampled lines.
    functions
        Shows the samples grouped by function.
    function [filename:]functionname
        Shows the callers and callees of a particular function.
    flame [-s --script-path] [-o --output-file path]
        Writes out a flamegraph to output-file (defaults to ~/flamegraph.svg)
        Requires that ~/flamegraph.pl exist.
        (Specify alternate script path with --script-path.)(tprint(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt
printusagessc	C`sF|dkrtj}nt|�dkr5t�dSi}d}d|d<|ddkrktj|d<n�|ddkr�tj|d<n|ddkr�tj|d<n_|ddkr�tj	|d<|d|d<d	}n+|dd
kr�tj
|d<nt�dSy5tjtj|ddd
dddg�\}}Wn(t
jk
ri}t|�t�dSXd|d<d}x�|D]�\}}|d kr�t|�|d<q�|d!kr�|}q�|d"kr�||d<q�|d#kr�||d<q�|d$kr�t�dSq�W|s"td�dStd|�ttj|��dS(%NiiiR(thotpathR�R�t	functionsitflames	hl:f:o:p:thelpslimit=sfile=soutput-file=sscript-path=g�������?R�s-ls--limits-fs--files-os
--output-fileR�s-ps
--script-pathR�s-hsmust specify --file to loadR&(s-ls--limit(s-fs--file(s-os
--output-file(s-ps
--script-path(s-hR5(RRYtargvRR1R�R�R�R�R�R�RtgetoptbtgetoptterrorR0R~R�Rt	strkwargs(	R6tdisplayargstoptstarttoptsRbtmsgR&toR�((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pytmain�sd

	"

	



t__main__((9t__doc__t
__future__RRRR#t
contextlibR8RfR�R
RPRYRiRFR5RRR�tcontextmanagert__all__R�RR�R
ROR%RDRVtEventRWR^R_RRdRRRsR�RR	R�R�RR�R�R�R�R�R�R�R�R�R1R@R"texit(((s8/usr/lib64/python2.7/site-packages/mercurial/statprof.pyt<module>gsz				,	<					
	
*	"		9HH!		_	@