
    ,hh                         / S Qr SSKrSSKrSSKrSSKrS
S jrS
S jr\R                  R                  \l	        \R                  R                  \l	         " S S\R                  5      rS rS r\S	:X  a  \" 5         gg))runrunctxProfile    Nc                 V    [         R                  " [        5      R                  XU5      $ N)
_pyprofile_Utilsr   r   )	statementfilenamesorts      1/opt/python-3.13.8/usr/lib/python3.13/cProfile.pyr   r      s     W%)))tDD    c                 X    [         R                  " [        5      R                  XUX45      $ r   )r   r	   r   r   )r
   globalslocalsr   r   s        r   r   r      s'    W%,,Y-5= =r   c                   N    \ rS rSrSS jrS rS rS rS rS r	S r
S	 rS
 rSrg)r      c                     SS K n[        U[        5      (       d  U4nUR                  U 5      R	                  5       R
                  " U6 R                  5         g Nr   )pstats
isinstancetupleStats
strip_dirs
sort_statsprint_stats)selfr   r   s      r   r   Profile.print_stats*   sB    $&&7DT%%'22D9EEGr   c                     SS K n[        US5       nU R                  5         UR                  U R                  U5        S S S 5        g ! , (       d  f       g = f)Nr   wb)marshalopencreate_statsdumpstats)r   filer!   fs       r   
dump_statsProfile.dump_stats0   s;    $LLQ' s   -A
Ac                 D    U R                  5         U R                  5         g r   )disablesnapshot_statsr   s    r   r#   Profile.create_stats6   s    r   c                    U R                  5       n0 U l        0 nU Hu  n[        UR                  5      nUR                  nXSR
                  -
  nUR                  nUR                  n0 n	X[        UR                  5      '   XeXxU	4U R                  U'   Mw     U H  nUR                  (       d  M  [        UR                  5      nUR                   Hy  n
 U[        U
R                  5         n	U
R                  nXZR
                  -
  nU
R                  nU
R                  nXI;   a   X   nX[S   -  nXkS   -  nX{S   -  nXS   -  nXVXx4X'   M{     M     g ! [         a     M  f = f)Nr            )getstatsr%   labelcode	callcountreccallcount
inlinetime	totaltimeidcallsKeyError)r   entriescallersdictsentryfuncncccttctcallerssubentryprevs               r   r,   Profile.snapshot_stats:   sW   --/
E$DB(((B!!BBG+2EJJ(!rw6DJJt  E{{{UZZ( %H!".r(--/@"A "++B333B!,,B!++B&}1g1g1g1g$&BNGM !,  $ ! !s   E
EEc                 F    SS K nUR                  nU R                  XU5      $ r   )__main____dict__r   )r   cmdrJ   dicts       r   r   Profile.run`   s!      {{3d++r   c                     U R                  5          [        XU5        U R                  5         U $ ! U R                  5         f = fr   )enableexecr+   )r   rL   r   r   s       r   r   Profile.runctxe   s5    	v&LLN LLNs	   0 Ac                ~    U R                  5          U" U0 UD6U R                  5         $ ! U R                  5         f = fr   )rP   r+   )r   r@   argskws       r   runcallProfile.runcalln   s0    	$$LLNDLLNs   * <c                 &    U R                  5         U $ r   )rP   r-   s    r   	__enter__Profile.__enter__u   s    r   c                 $    U R                  5         g r   )r+   )r   exc_infos     r   __exit__Profile.__exit__y   s    r   )r%   N))__name__
__module____qualname____firstlineno__r   r(   r#   r,   r   r   rV   rY   r]   __static_attributes__ r   r   r   r      s1    H(!3L,
r   r   c                 |    [        U [        5      (       a  SSU 4$ U R                  U R                  U R                  4$ )N~r   )r   strco_filenameco_firstlinenoco_name)r5   s    r   r4   r4   ~   s8    $Q~  $"5"5t||DDr   c            
         SS K n SS KnSS KnSS KnSSKJn  SnU" US9nSUl        UR                  SSSS	S S
9  UR                  SSSSS[        UR                  R                  5      S9  UR                  SSSSSS9  UR                  SS  (       d!  UR                  5         UR                  S5        UR                  5       u  pxXR                  S S & UR                  b*  U R                   R#                  UR                  5      Ul        [%        U5      S:  a  UR&                  (       a  Sn	UR(                  US   S.n
OUS   nUR                   R+                  SU R                   R-                  U5      5        [.        R0                  " U5       n[3        UR5                  5       US5      n	S S S 5        [6        R8                  R;                  SS US9nUUR<                  UR>                  S S S.n
 [A        W	U
S UR                  URB                  5        U$ UR                  5         U$ ! , (       d  f       N= f! [D         a-  nS Ul#        UR                  URH                  5         S nAU$ S nAff = f)Nr   )OptionParserzNcProfile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...)usageFz-oz	--outfileoutfilezSave stats to <outfile>)desthelpdefaultz-sz--sortr   z?Sort order when printing to stdout, based on pstats.Stats classr1   )rp   rq   rr   choicesz-mmodule
store_truezProfile a library module)rp   actionrq   rr   r0   z(run_module(modname, run_name='__main__'))
run_modulemodnamerQ   rJ   )nameloaderorigin)__spec____file__r`   __package__
__cached__)%ossysrunpyr   optparserm   allow_interspersed_args
add_optionsortedr   sort_arg_dict_defaultargvprint_usageexit
parse_argsro   pathabspathlenrt   rw   insertdirnameio	open_codecompileread	importlib	machinery
ModuleSpecr{   ry   r   r   BrokenPipeErrorstdouterrno)r   r   r   r   rm   rn   parseroptionsrT   r5   globsprognamefpspecexcs                  r   mainr      s0   %\E&F%*F"
dKi&  6
dH6Nv||99:  < d,'  8 88AB<'')OWHHQK "''//'//:
4y1}>>=D#..7E
 AwHHHOOArwwx89h'2rwwy(F; (&&11z$9A 2 CD ! KK II#"E	 4goow||D M 	M' ('  	 CJHHSYY M	 s$   H%.#H6 %
H36
I- "I((I-rJ   )Nr_   )__all___lsprofimportlib.machineryr   r   profiler   r   r   __doc__Profilerr   r4   r   r`   re   r   r   <module>r      s~    '   	 
E= nn$$""**]g ]BE;| zF r   