�`^c@s�dZddlZddlZddlZddlmZmZd�Zddd��YZdej fd��YZ d dd
��YZ
ddd��YZd
�ZdS(s Statistics analyzer for HotShot.i�N(tENTERtEXITcCst|�j�S(N(tStatsLoadertload(tfilename((s#/sys/lib/python2.7/hotshot/stats.pyRsRcBs#eZd�Zd�Zd�ZRS(cCs.||_i|_g|_|jj|_dS(N(t_logfnt_codet_stacktpopt pop_frame(tselftlogfn((s#/sys/lib/python2.7/hotshot/stats.pyt__init__s cCs�t�}t|_tjj|j�}d}x�|D]�}|\}\}}}} | dkrk|| 7}n|tkr�|j|||�}
|j |
|d�d}q4|t
kr4|j�}
|j|
|d�d}q4q4Wt
j|�S(Nig���(tProfilet_brokentimertget_timethotshottlogt LogReaderRRt new_framettrace_dispatch_callRR ttrace_dispatch_returntpstatstStats(R
tpRttaccumteventtwhatRtlinenotfuncnamettdeltatframe((s#/sys/lib/python2.7/hotshot/stats.pyRs"
cGs�y|j|}Wn*tk
r=t|�}||j|<nX|jrW|jd}nd}t||�}|jj|�|S(Ni�(RtKeyErrortFakeCodeRtNonet FakeFrametappend(R
targstcodetbackR((s#/sys/lib/python2.7/hotshot/stats.pyR6s
(t__name__t
__module__RRR(((s#/sys/lib/python2.7/hotshot/stats.pyRs R
cBseZd�ZRS(cCsdS(N((R
((s#/sys/lib/python2.7/hotshot/stats.pytsimulate_cmd_completeKs(R(R)R*(((s#/sys/lib/python2.7/hotshot/stats.pyR
JsR!cBseZd�ZRS(cCs&||_||_||_|_dS(N(tco_filenametco_firstlinenotco_nameR((R
RtfirstlinenoR((s#/sys/lib/python2.7/hotshot/stats.pyRPs (R(R)R(((s#/sys/lib/python2.7/hotshot/stats.pyR!OsR#cBseZd�ZRS(cCs||_||_dS(N(tf_backtf_code(R
R&R'((s#/sys/lib/python2.7/hotshot/stats.pyRWs (R(R)R(((s#/sys/lib/python2.7/hotshot/stats.pyR#VscCs
td�dS(Nsthis timer should not be called(tRuntimeError(((s#/sys/lib/python2.7/hotshot/stats.pyR\s((((
t__doc__tprofileRthotshot.logRRRRRR
R!R#R(((s#/sys/lib/python2.7/hotshot/stats.pyt<module>s ;
|