+
    ifr  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	 ^ RI
Ht . ROt]! ]4       ! R	 R4      4       t]! R
R7       ! R R4      4       t]! R
R7       ! R R4      4       t ! R R4      t ! R R4      tR tR tR tR tR tR tR t]R8X  d   ^ RIt ^ RIt ! R R]P:                  4      t]! ] P@                  4      ^8  d   ] P@                  ^,          t!MRt! ]! ]!4      t"] P@                  R,           F  t#]"PI                  ]#4       K  	  ]%! R]"PL                  R7       ]"PO                  4        ]%! R]"PL                  R7       R# R#   ] d     Li ; i  ]( d     R# i ; i)     N)StrEnum_simple_enum)
cmp_to_key)	dataclassStatsSortKeyFunctionProfileStatsProfilec                   sJ   a  ] tR t^#t o R	tR
tRtRtRtRt	Rt
RtRtR tRtV tR# )r   linenamenflpcallsstdnamec                s    V^ ,          p\         P                  W4      pW#n        VR,           F  pW0P                  V&   K  	  Wn        V# )r       NN)str__new__Z_value_Z_value2member_map_Z_all_values)ZclsvaluesvalueZobjZother_value   &*   /usr/lib64/python3.14/pstats.pyr   ZSortKey.__new__/   sF    q	kk#%!"::K25"";/ & 
     N)callsncalls)
cumulativecumtime)filenamemodule)timetottime)__name__
__module____qualname____firstlineno__ZCALLSZ
CUMULATIVEZFILENAMEZLINEZNAMEZNFLZPCALLSZSTDNAMEZTIMEr   __static_attributes____classdictcell____classdict__   @r   r   r   #   s<     E(J#HDD
CFGD r   T)Zunsafe_hashc                   s,   a  ] tR t^9t o V 3R ltRtV tR# )r   c                sn   < V ^8  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[ ;R&   S[;R&   # )   r   r   percall_tottimer   percall_cumtime	file_nameline_number)r   floatintZformatr'      "r   __annotate__ZFunctionProfile.__annotate__9   sZ     K  N  	 
 N    N   r   r   Nr    r!   r"   r#   Z__annotate_func__r$   r%   r&   r(   r   r   r   9         r   c                   s,   a  ] tR t^Ct o V 3R ltRtV tR# )r   c                sH   < V ^8  d   Qh/ S[ ;R&   S[S[S[3,          ;R&   # )r)   total_ttfunc_profiles)r.   dictr   r   r0   r1   r   r2   ZStatsProfile.__annotate__C   s(      O  _,--	 r   r   Nr3   r&   r(   r   r   r   C   r4   r   c                   s   a  ] tR t^It o RR/R ltR tR tR tR tR t	R	R&R
R&RR'RR'RR(RR)RR(RR*RR+RR,RR-RR.RR./t
R tR tR tR tR tR tR tR tR tR tR  tR! tR/R" ltR# tR$ tR%tV tR# )0r   streamNc               s    T;'       g    \         P                  V n        \        V4      '       g   R pMV^ ,          pVR,          pV P	                  V4       V P
                  ! V!   R # )Nr   )sysstdoutr8   leninitadd)selfr8   argsargs   &$* r   __init__ZStats.__init__k   sK    **

4yyCq'C8D		#$r   c                s   R V n         . V n        R V n        ^ V n        ^ V n        ^ V n        ^ V n        \        4       V n        / V n	        / V n
        V P                  V4        V P                  4        R #   \         dF    \        RT P                  '       d   T P                  R,          MR,          T P                  R7       h i ; i)NzInvalid timing data %s file)all_calleesfilesfcn_listr5   total_calls
prim_callsmax_name_lenset	top_levelstatssort_arg_dict
load_statsget_top_level_stats	Exceptionprintr8   )r>   r@      &&r   r<   Z
Stats.initu   s    

	$$& 	*%)ZZZ4::b>R9?C{{L	s   !A3 3ACc                s^   Vf
   / V n         R # \        V\        4      '       d   \        VR4      ;_uu_ 4       p\        P
                  ! V4      V n         R R R 4        \        P                  ! V4      p\        P                  ! VP                  4      R,           V,           pT.T n        M:\        VR4      '       d)   VP                  4        VP                   V n         / Vn         V P                   '       g   \        RV P                  : RV: 24      hR #   + '       g   i     L; i    L; i)NZrbz    create_statszCannot create or construct a z object from )rN   
isinstancer   openmarshalZloadosstatr   ZctimeZst_mtimerG   ZhasattrrU   	TypeError	__class__)r>   r@   fZ
file_statss   &&  r   rP   ZStats.load_stats   s    ;DJS!!c4A$\\!_
 !WWS\
jj!4!45>D DJS.))DJCIzzz#~~s4 5 5 !
s   DAD( D%	(D,c                s   V P                   P                  4        F  w  pw  r#rEpV ;P                  V,          un        V ;P                  V,          un        V ;P                  V,          un        RV9   d   V P
                  P                  V4       \        \        V4      4      V P                  8  g   K  \        \        V4      4      V n	        K  	  R# )jprofileN)r^   r    Zprofiler)
rN   itemsrI   rJ   r5   rM   r=   r;   func_std_stringrK   )r>   funcccncttctcallerss   &      r   rQ   ZStats.get_top_level_stats   s    /3zz/?/?/A+D+227"OO"OMM"M*g5""4(?4()D,=,==$'(=$>! 0Br   c                s0   V'       g   V # \        V4       EF{  p\        V 4      \        V4      8w  d   \        V4      pV ;P                  VP                  ,          un        V ;P                  VP                  ,          un        V ;P
                  VP
                  ,          un        V ;P                  VP                  ,          un        VP                   F  pV P                  P                  V4       K   	  V P                  VP                  8  d   VP                  V n	        R V n
        VP                  P                  4        FH  w  r4W0P                  9   d   V P                  V,          pM^ ^ ^ ^ / 3p\        WT4      V P                  V&   KJ  	  EK~  	  V # N)Zreversedtyper   rG   rI   rJ   r5   rM   r=   rK   rH   rN   r_   add_func_stats)r>   Zarg_listZitemra   rZ   Zold_func_stats   &*    r   r=   Z	Stats.add   s%   KX&DDzT$Z'T{JJ$**$J 0 00OOt.OMMT]]*M""4( '   4#4#44$($5$5! DM"jj..0
::%$(JJt$4M%&1a$5M#1-#F

4  1 '* r   c                s    \        VR 4      ;_uu_ 4       p\        P                  ! V P                  V4       RRR4       R#   + '       g   i     R# ; i)ZwbN)rW   rX   ZdumprN   )r>   r   r]      && r   
dump_statsZStats.dump_stats   s2    (D!!QLLQ' "!!!s   "AA	r   r   r   r   r   r	   r   r
   r   r   r   r   r   c                s    V P                   '       g[   / ;V n         p/ pV P                  P                  4        F&  w  r4TpV'       g   K  WQ9   d   ^ W%&   K  WAV&   VRR pK!  	  V F  pW K  	  V P                   # )r    NrE   )rO   sort_arg_dict_defaultr_   )r>   r7   Zbad_listwordZtupZfragments   &     r   get_sort_arg_defsZStats.get_sort_arg_defs   s    !!!(**DH!77==?	h'-.*%(N'}H @ !J !!!!r   c                s   V'       g
   ^ V n         V # \        V4      ^8X  d8   \        V^ ,          \        4      '       d   R
R^ R^R^R/V^ ,          ,          .pMK\        V4      ^8  d<   VR,           F.  p\	        V4      \	        V^ ,          4      8w  g   K%  \        R4      h	  V P                  4       pRpRV n        RpV Fj  p\        V\        4      '       d   VP                  pWCV,          ^ ,          ,           pV ;P                  WSV,          ^,          ,           ,          un        RpKl  	  . pV P                  P                  4        F6  w  pw  rrpVP                  WW3V,           \        V4      V3,           4       K8  	  VP                  \        \!        V4      P"                  4      R	7       . ;V n         pV F  pVP                  VR
,          4       K  	  V # )r    r   r   r   r   r   zCan't have mixed argument typerB   z, )keyrE   r   )rH   r;   rV   r/   rh   r[   rn   	sort_typer   r   rN   r_   appendr`   Zsortr   	TupleCompcompare)r>   Zfieldr@   Zsort_arg_defsZ
sort_tupleZ	connectorrm   Z
stats_listra   rb   rc   rd   re   rf   rH   tuples   &*              r   
sort_statsZStats.sort_stats   s   DMKu:?z%(C88976<) */q3 5E Z1_Ryy9U1X.#$DEE ! ..0
	D$((zz#D&9!&<<JNNi*=a*@@@NI  
/3zz/?/?/A+D+227rr.5.t4d;< = 0B 	Jy'<'D'DEF#%%EOOE"I&  r   c                s^    V P                   '       d   V P                   P                  4        V # rg   )rH   Zreverser>      &r   reverse_orderZStats.reverse_order  s     ===MM!!#r   c           	     s$   V P                   p/ ;V n         p^ pVP                  4        F  w  pw  rVrxp	\        V4      p
\        \	        V
4      4      V8  d   \        \	        V
4      4      p/ pV	P                  4        F  w  rW\        V4      &   K  	  W9   d   \        W*,          WVWxV34      W*&   K  WVWxV3W*&   K  	  V P                  p\        4       ;V n        pV F  pVP                  \        V4      4       K  	  W0n	        RV n
        RV n        V # )r    N)rN   r_   func_strip_pathr;   r`   ri   rM   rL   r=   rK   rH   rF   )r>   ZoldstatsZnewstatsrK   ra   rb   rc   rd   re   rf   ZnewfuncZ
newcallersfunc2callerZold_topZnew_tops   &               r   
strip_dirsZStats.strip_dirs  s   :: ""
X/7~~/?+D+227%d+G?7+,|;"?7#;<J!(5;?512 "1 "$2(0(9)+(D%F! &(RZ$@! 0@ ..#&5(DKK-.  )r   c                s    V P                   '       d   R # / ;V n         pV P                  P                  4        FB  w  pw  r4rVpW!9   g   / W&   VP                  4        F  w  rW9   g   / W&   WV,          V&   K  	  KD  	  R # rg   )rF   rN   r_   )
r>   rF   ra   rb   rc   rd   re   rf   rz   r{   s
   &         r   calc_calleesZStats.calc_callees3  s    )++;/3zz/?/?/A+D+227&$&!!(+)+K&,2E"4( "1 0B 	r   c                s   Tp\        V\        4      '       dW    \        P                  ! V4      p. pT F6  pTP                  \        T4      4      '       g   K%  TP                  T4       K8  	  M\        V4      p\        V\        4      '       d1   RTu;8:  d   R8  d"   M M\        Wq,          R,           4      pVRV pM/\        V\        4      '       d   ^ Tu;8:  d   V8  d   M MTpVRV p\        V4      \        V4      8w  d)   VR\        V4      : R\        V4      : RV: R2,          pWC3#   \        P                   d    TR T,          ,          pYC3u # i ; i)	z#   <Invalid regular expression %r>
g        g      ?g      ?Nz   List reduced from z to z due to restriction <z>
)rV   r   reZcompileZPatternErrorZsearchr`   rq   r;   r.   r/   )r>   ZsellistmsgZnew_listZrexra   counts   &&&&    r   eval_print_amountZStats.eval_print_amountF  s%   c3%jjo H::od344OOD)  IE#u%%#*:s*:EK",-<C%%!s*:U*:<t9H%D	3x=#/ /C }' ?? %=CC}$%s   D3 3(EEc           
     s   V P                   '       d   V P                   R ,          M"\        V P                  P                  4       4      pV'       g   \	        ^ / 4      # \        \        V P                  4      4      p/ p\	        W#4      pV F  pV P                  V,          w  rgrp
Vw  rpWv8X  d   \        V4      M!\        V4      R,           \        V4      ,           p\        \        V4      4      pV^ 8X  d   RM\        \        W,          4      4      p\        \        V	4      4      pV^ 8X  d   RM\        \        W,          4      4      p\        VVVVVVV4      pVW=&   K  	  V# )NNN/rE   )
rH   r   rN   keysr   r.   f8r5   r   r   )r>   Z	func_listr5   r6   Zstats_profilera   rb   rc   rd   re   rf   r,   r-   	func_namer   r   r*   r   r+   Zfunc_profiles   &                   r   get_stats_profileZStats.get_stats_profile`  s"    )-DMM!$4

@Q;R	2&&DMM*+$X=D&*jj&6#BBG04-II "SWs2w}s2w/FFBrFmG$&!Gbr"%y1AOBrFmG$&!Gbr"%y1AO*L (4M$# & r   c                s6   V P                   pV P                  '       d/   V P                  R ,          pRV P                  ,           R,           pM%\        V P                  P                  4       4      pRpV F  pV P                  WSV4      w  r4K  	  \        V4      pV'       g   ^ V3# \        W@P                  R7       V\        V P                  4      8  d;   ^ pV F2  p\        \        V4      4      V8  g   K  \        \        V4      4      pK4  	  V^,           V3# )r   z   Ordered by: Z
z!   Random listing order was used
rC   )rK   rH   rp   r   rN   r   r   r;   rS   r8   r`   )r>   Zsel_listwidthZ	stat_listr   Z	selectionr   ra      &&      r   get_print_listZStats.get_print_list  s    !!===a(I#dnn4t;CTZZ__./I6C!I!33I#NNIs " Ii<c$3tzz?"E!-.6 56E " Qw	!!r   c                s@   V P                    F  p\        W P                  R 7       K  	  V P                   '       d   \        V P                  R 7       RpV P                   F$  p\        V\	        V4      V P                  R 7       K&  	  \        W0P
                  RRV P                  R7       V P
                  V P                  8w  d*   \        RV P                  ,          RV P                  R7       \        RV P                  ,          V P                  R 7       \        V P                  R 7       V P                  V4      w  rVV'       dW   V P                  4        V F  pV P                  V4       K  	  \        V P                  R 7       \        V P                  R 7       V # )rC    zfunction callsZendrD   z(%d primitive calls)zin %.3f seconds        )rG   rS   r8   rM   func_get_function_namerI   rJ   r5   r   print_title
print_line)r>   amountr   indentra   r   r   s   &*     r   print_statsZStats.print_stats  s   

H(- #:::t{{#NND&06T[[I # 	f&&(8cTt.(4??:$++V$--/dkkB4;;))&1% t{{#t{{#r   c                sx   V P                  V4      w  r#V'       d   V P                  4        V P                  VR 4       V FJ  pW@P                  9   d&   V P	                  W$V P                  V,          4       K8  V P	                  W$/ 4       KL  	  \        V P                  R7       \        V P                  R7       V # )z	called...rC   )r   r}   print_call_headingrF   print_call_linerS   r8   )r>   r   r   r   ra   r   r   print_calleesZStats.print_callees  s    ))&1##E;7+++((d6F6Ft6LM((b9	 
 t{{#t{{#r   c                s   V P                  V4      w  r#V'       dr   V P                  VR 4       V F-  pV P                  V,          w  rVrxp	V P                  W$V	R4       K/  	  \	        V P
                  R7       \	        V P
                  R7       V # )zwas called by...z<-rC   )r   r   rN   r   rS   r8   )
r>   r   r   r   ra   rb   rc   rd   re   rf   s
   &*        r   print_callersZStats.print_callers  sx    ))&1##E+=>*.**T*:'$$U'4@  t{{#t{{#r   c                s   \        R P                  V4      V,           V P                  R7       RpV P                  P	                  4        FC  w  rErgpV'       g   K  \        \        VP	                  4       4      4      p	\        V	\        4      p M	  V'       d(   \        RV,          R,           V P                  R7       R# R# )z	Function rC   Fr   z    ncalls  tottime  cumtimeN)	rS   ljustr8   rN   r   ZnextZiterrV   rt   )
r>   	name_sizeZcolumn_titleZ	subheaderrb   rc   rd   re   rf   r   s
   &&&       r   r   ZStats.print_call_heading  s    k	*\9L	'+zz'8'8':#BBGwT'.."234&ue4		 (;
 #i-"@@t{{S r   c           	     s   \        \        V4      P                  V4      V,           R V P                  R7       V'       g   \        V P                  R7       R# \	        VP                  4       4      pRpV F  p\        V4      pW7,          p	\        V	\        4      '       dt   V	w  rrW8w  d   RW3,          pM
RV
3,          pVP                  ^^\        V4      ,          ,           4      : R \        V4      : R \        V4      : RV: 2pV^,           pM7V: RV	: R	\        V P                  V,          ^,          4      : 2pV^,           p\        Wo,          V,           V P                  R7       R pK  	  R# )
r   r   rC   NrB   z%d/%dz%dz  Z(z) )rS   r`   r   r8   Zsortedr   rV   rt   rjustr;   r   rN   )r>   r   sourceZ	call_dictZarrowZclistr   ra   r
   r   rc   rb   rd   re   ZsubstatsZ
left_widths   &&&&&           r   r   ZStats.print_call_line  s   of%++I6>CdkkZt{{#y~~'(D"4(DOE%''!&8&"1H#re|H-5^^AaFmO-L-/VRVTC&]
*.r$**T:J1:M7NO&]
&#h.T[[AF! r   c                sd    \        R RV P                  R7       \        RV P                  R7       R# )z-   ncalls  tottime  percall  cumtime  percallr   r   zfilename:lineno(function)rC   NrS   r8   rv   rw   r   r   ZStats.print_title  s"    =3T[[Y)<r   c                s   V P                   V,          w  r#rEp\        V4      pW28w  d   VR ,           \        V4      ,           p\        VP                  ^	4      RV P                  R7       \        \        V4      RV P                  R7       V^ 8X  d   \        RRV P                  R7       M'\        \        WC,          4      RV P                  R7       \        \        V4      RV P                  R7       V^ 8X  d   \        RRV P                  R7       M'\        \        WR,          4      RV P                  R7       \        \        V4      V P                  R7       R# )r   r   r   rC   Nr   )rN   r   rS   r   r8   r   r`   )r>   ra   rb   rc   rd   re   rf   Zcr   r   r   ZStats.print_line  s    "&**T"2G8C#b'!Aaggajc4bf#DKK07%St{{3"RU)4;;7bf#DKK07%St{{3"RU)4;;7od#$++6r   )rF   rH   rG   rK   rJ   rO   rp   rN   r8   rM   rI   r5   )))r   rE   z
call count)))i   rE   zcumulative time))i   r   z	file name))i   r   zline number))i   r   zfunction name))r   r   r   zname/file/line)))r    rE   zprimitive call count)))i   r   zstandard name)))r)   rE   zinternal time)z->)r    r!   r"   r#   rA   r<   rP   rQ   r=   rk   rl   rn   ru   rx   r|   r}   r   r   r   r   r   r   r   r   r   r   r$   r%   r&   r(   r   r   r   I   s     DT &,?4( CCHHBDBFGMFFF ""%N
:&4!F"0.	
T2=7 7r   c                   s,   a  ] tR tRt o R tR tRtV tR# )rr   i  c                s    Wn         R # rg   comp_select_list)r>   r   rT   r   rA   ZTupleComp.__init__  s     0r   c                sz    V P                    F*  w  r4W,          pW#,          pWV8  d   V) u # WV8  g   K(  Vu # 	  ^ # r    r   )r>   ZleftZrightZindexZ	directionZlZr   &&&    r   rs   ZTupleComp.compare  s@     $ 5 5EAAu!z!u   !6 r   r   N)r    r!   r"   r#   rA   rs   r$   r%   r&   r(   r   rr   rr     s     1 r   rr   c                 sN    V w  rp\         P                  P                  V4      W#3# rg   )rY   ZpathZbasename)r   r   r	   r
   s   &   r   ry   ry      s&    $HD77H%t11r   c                 s    V ^,          # )r)   r   )ra   rw   r   r   r   $  s    7Nr   c                 s    V R ,          R8X  dF   V ^,          pVP                  R4      '       d$   VP                  R4      '       d   RV^R ,          # V# RV ,          # ):Nr)   NZ<Z>z{%s}z	%s:%d(%s))Z~r    rE   )
startswithZendswith)r   r
   s   & r   r`   r`   '  sU    } |??3DMM#$6$6D2J&&KY&&r   c                 sj    Vw  r#rEpV w  rxrpW',           W8,           WI,           WZ,           \        W4      3# rg   )add_callers)targetr   rb   rc   rd   re   rf   Zt_ccZt_ncZt_ttZt_ctZ	t_callerss   &&          r   ri   ri   8  s=    $BBG(.%DIGRWbgrw)-/ /r   c           	      s   / pV P                  4        F	  w  r4WBV&   K  	  VP                  4        F  w  r4W29   d}   \        V\        4      '       dQ   \        ;QJ d$    . R  \        WBV,          4       4       F  NK  	  5M! R  \        WBV,          4       4       4      W#&   Kq  W#;;,          V,          uu&   K  WBV&   K  	  V# )c              3   s6   "   T F  w  rW,           x  K  	  R # 5irg   r   ).0ZiZj   &  r   	<genexpr>Zadd_callers.<locals>.<genexpr>H  s     )[<ZDA!%%<Zs   )r_   rV   rt   Zzip)r   r   Znew_callersra   r{   s   &&   r   r   r   ?  s    K"D '&%(($)E)[CTXHY<Z)[EE)[CTXHY<Z)[$[! !V+! & ' r   c                 sH    ^ pV P                  4        F  pW,          pK  	  V# r   )r   )rf   rc   r   r   r   count_callsr   P  s$    	
B!
 "Ir   c                 s    R V ,          # )z%8.3fr   )xrw   r   r   r   [  s    Q;r   Z__main__c                   s   a  ] tR tRt o RR ltR tR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )ProfileBrowserii  Nc                s    \         P                  P                  V 4       R V n        RV n        \
        P                  V n        Ve   V P                  V4       R# R# )% N)	cmdCmdrA   promptrN   r9   r:   r8   do_read)r>   profilerT   r   rA   ZProfileBrowser.__init__j  sD    GGT"DKDJ**DK"W% #r   c                s   VP                  4       p. pV F  p VP                  \        V4      4       K   	  V P                  '       d   \        V P                  V4      ! V!   ^ # \        RV P                  R7       ^ #   \         d     Mi ; i \	        T4      pT^8  g   T^ 8  d   \        RT P                  R7       K  TP                  T4       K    \         d     Mi ; iTP                  T4       K  )r   z#Fraction argument must be in [0, 1]rC   No statistics object is loaded.)	splitrq   r/   Z
ValueErrorr.   rS   r8   rN   Zgetattr)r>   Zfnr	   r?   Z	processedZtermZfracr   r   genericZProfileBrowser.genericr  s    ::<DI$$SY/   zzz

B'3  7dkkJ! "  ;Dax4!8C$++V $$T*!   &s)   A>>BB0CCC#"C#c                s   \        R V P                  R7       \        RV P                  R7       \        RV P                  R7       \        RV P                  R7       \        RV P                  R7       \        RV P                  R7       R# )zArguments may be:rC   z0* An integer maximum number of entries to print.z:* A decimal fractional number between 0 and 1, controllingz-  what fraction of selected entries to print.z8* A regular expression; only entries with function namesz  that match it are printed.Nr   rv   rw   r   generic_helpZProfileBrowser.generic_help  sb    %DKK8D4;;WNUYU`U`aATLSWS^S^_0t{{Cr   c                s   V P                   '       d    V P                   P                  V4       ^ # \        RV P                  R7       ^ #   \         d+   p\        R T: RT: 2T P                  R7        Rp?^ # Rp?ii ; i)zFailed to load statistics for z: rC   Nr   )rN   r=   OSErrorrS   r8   )r>   r	   Zerj   r   do_addZProfileBrowser.do_add  sl    zzz`JJNN4(
  7dkkJ	  `D!LSWS^S^__ 	`s   A
 
A?A::A?c                4    \        R V P                  R7       R# )z>Add profile info from given file to current statistics object.rC   Nr   rv   rw   r   help_addZProfileBrowser.help_add  s    RY]YdYder   c                &    V P                  R V4      # )r   r   r>   r	   rT   r   
do_calleesZProfileBrowser.do_callees      <<66r   c                T    \        R V P                  R7       V P                  4        R# )z6Print callees statistics from the current stat object.rC   NrS   r8   r   rv   rw   r   help_calleesZProfileBrowser.help_callees       JQUQ\Q\]r   c                r   )r   r   r   rT   r   
do_callersZProfileBrowser.do_callers  r   r   c                r   )z6Print callers statistics from the current stat object.rC   Nr   rv   rw   r   help_callersZProfileBrowser.help_callers  r   r   c                s4    \        R V P                  R7       ^# )rB   rC   r   r   rT   r   do_EOFZProfileBrowser.do_EOF  s    "4;;'r   c                r   zLeave the profile browser.rC   Nr   rv   rw   r   help_EOFZProfileBrowser.help_EOF      .T[[Ar   c                s    ^# )r   r   r   rT   r   do_quitZProfileBrowser.do_quit  s    r   c                r   r   r   rv   rw   r   	help_quitZProfileBrowser.help_quit  r   r   c                s   V'       d"    \        V4      V n        TR,           T n	        ^ # \        V P                  4      ^8  d#   V P                  RR pV P                  V4       ^ # \        RV P
                  R7       ^ #   \         d4   p\        TP                  ^,          T P
                  R7        Rp?R# Rp?i\         d>   p\        TP                  P                  R,           Y P
                  R7        Rp?R# Rp?ii ; i)r   rC   NZ:r   z1No statistics object is current -- cannot reload.i)r   rN   r   rS   r?   r8   rR   r\   r    r   r;   r   )r>   r	   Zerrrj   r   r   ZProfileBrowser.do_read  s    !&tDJ #Tk  T[[!A%{{3B'T"  IPTP[P[\  #((1+DKK8  #--0036++Ns)   A? ?D
(B88DD2C>>Dc                b    \        R V P                  R7       \        RV P                  R7       R# )z+Read in profile data from a specified file.rC   z*Without argument, reload the current file.Nr   rv   rw   r   	help_readZProfileBrowser.help_read  s     ?dkkR>T[[Qr   c                s    V P                   '       d   V P                   P                  4        ^ # \        R V P                  R7       ^ # )r   rC   )rN   rx   rS   r8   r   rT   r   
do_reverseZProfileBrowser.do_reverse  s4    zzz

((*  7dkkJr   c                r   )z/Reverse the sort order of the profiling report.rC   Nr   rv   rw   r   help_reverseZProfileBrowser.help_reverse  s    C$++Vr   c                st  a V P                   '       g   \        R V P                  R7       R# V P                   P                  4       oV'       d   \        ;QJ d-    V3R lVP                  4        4       F  '       d   K   RM"	  RM! V3R lVP                  4        4       4      '       d+   V P                   P                  ! VP                  4       !   ^ # \        RV P                  R7       \        P                  P                  4        F*  w  r#\        V: RV^,          : 2V P                  R7       K,  	  ^ # )r   rC   Nc              3   s,   <"   T F	  qS9   x  K  	  R # 5irg   r   )r   r   abbrevss   & r   r   Z)ProfileBrowser.do_sort.<locals>.<genexpr>  s     ALq'\Ls   FTz/Valid sort keys (unique prefixes are accepted):z -- )
rN   rS   r8   rn   Zallr   ru   r   rl   r_   )r>   r	   ro   r   r   s   &&  @r   do_sortZProfileBrowser.do_sort  s    :::7dkkJjj224GADJJLAADJJLAAA

%%tzz|4
  GdkkZ$)$?$?$E$E$GLSU1X6T[[I %Hr   c                r   )z.Sort profile data according to specified keys.rC   z3(Typing `sort' without arguments lists valid keys.)Nr   rv   rw   r   	help_sortZProfileBrowser.help_sort  s     BUGdkkZr   c                s|    \         P                   Uu. uF  q3P                  V4      '       g   K  VNK  	  up# u upi rg   )r   rl   r   )r>   Ztextr?   Zas   &&* r   complete_sortZProfileBrowser.complete_sort  s-    $::Q:!ll4>PAA:QQQs   99c                r   )r   r   r   rT   r   do_statsZProfileBrowser.do_stats  s    <<t44r   c                r   )z.Print statistics from the current stat object.rC   Nr   rv   rw   r   
help_statsZProfileBrowser.help_stats  s    BUr   c                s    V P                   '       d   V P                   P                  4        R# \        R V P                  R7       R# )r   rC   N)rN   r|   rS   r8   r   rT   r   do_stripZProfileBrowser.do_strip  s*    zzz

%%'7dkkJr   c                r   )z<Strip leading path information from filenames in the report.rC   Nr   rv   rw   r   
help_stripZProfileBrowser.help_strip  s    PW[WbWbcr   c                r   )zShow help for a given command.rC   Nr   rv   rw   r   	help_helpZProfileBrowser.help_help  s    2Er   c                s    V'       d   V# R # rg   r   )r>   Zstopr	   s   &&&r   postcmdZProfileBrowser.postcmd  s    r   )r   rN   r8   rg   ) r    r!   r"   r#   rA   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r$   r%   r&   r(   r   r   r   i  s     	&	0	D		f	7	 	7	 		B		B	"	R		W		[	R	5	 	K
	d	F	 	r   r   :r)   NNz*Welcome to the profile statistics browser.rC   zGoodbye.)r   r   r   r   ))r9   rY   r   rX   r~   Zenumr   r   Z	functoolsr   Zdataclassesr   Z__all__r   r   r   r   rr   ry   r   r`   ri   r   r   r   r    r   ZreadlineZImportErrorr   r   r;   ZargvZinitprofileZbrowserr   r   rS   r8   ZcmdloopZKeyboardInterruptr   r   r   <module>r      s  .  	   	 &   !
Ag  * t   t. . .
|7 |7| 22	'"/" zP Pd 388}qhhqk -xx||GNN7# $:Pjw~~.G   @  s%   #E *A+E& E#"E#&E10E1