ó
    6°hY€  ã                  ó@  • S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSKJr  SSKJrJr  \R$                  r\R&                  r/ SQr1 SkrS	 r " S
 S5      r\" 5       r " S S5      r " S S5      rS r\R8                  " 5       rS rS rSq S)S jr!S r"S r#S r$S*S jr%\S 5       r& " S S5      r' " S S5      r(S+S jr)S r*S r+S*S  jr,S,S! jr-S-S" jr.0 r/S# r0S$ r1S.S% jr2S& r3S*S' jr4\5S(:X  a  \
Rl                  " \4" 5       5        gg)/aÀ
  
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.
é    )ÚannotationsN)ÚListé   )ÚencodingÚpycompat)ÚstartÚstopÚresetÚdisplayÚprofile>   úutil.py:checkúhg.py:<module>údispatch.py:runúpager.py:pagecmdúcolor.py:colorcmdúdispatch.py:<lambda>údispatch.py:dispatchúdispatch.py:_dispatchúdispatch.py:_runcatchúdispatch.py:checkargsúextensions.py:closureúdispatch.py:runcommandúdispatch.py:_runcommandúevolve.py:warnobserrorsc                 óL   • [         R                  " 5       n U S   U S   -   U S   4$ )Nr   r   é   )ÚosÚtimes)r   s    Ú4/usr/lib/python3/dist-packages/mercurial/statprof.pyÚclockr    ˜   s)   € Ü�HŠH‹J€EØ�!‰H�u˜Q‘xÑ  q¡Ð*Ð*ó    c                  óP   • \ rS rSr% S\S'   SS jrSS jrS rS r\	S	 5       r
S
rg)ÚProfileStateé¡   zList[Sample]ÚsamplesNc                ó4   • U R                  U5        SU l        g )Nó   cpu)r
   Útrack©ÚselfÚ	frequencys     r   Ú__init__ÚProfileState.__init__¤   s   € Ø�
‰
�9ÔØˆ�
r!   c                ó¢   • SU l         S U l        U(       a  SU-  U l        O[        U S5      (       d  SU l        O S U l        SU l        / U l        g )N)ç        r/   g      ð?Úsample_intervalçü©ñÒMbP?r   )Úaccumulated_timeÚlast_start_timer0   ÚhasattrÚremaining_prof_timeÚprofile_levelr%   r)   s     r   r
   ÚProfileState.reset¨   sS   € à *ˆÔà#ˆÔæØ#&¨¡?ˆDÕ Ü˜Ð0×1Ñ1à#/ˆDÕ ð Ø#'ˆÔ àˆÔàˆ�r!   c                ó¶   • US   U R                   S   -
  US   U R                   S   -
  4nU R                  S   US   -   U R                  S   US   -   4U l        g ©Nr   r   )r3   r2   )r*   Ú	stop_timeÚ	increments      r   Úaccumulate_timeÚProfileState.accumulate_time¼   sq   € à�a‰L˜4×/Ñ/°Ñ2Ñ2Ø�a‰L˜4×/Ñ/°Ñ2Ñ2ð
ˆ	ð
 ×!Ñ! !Ñ$ y°¡|Ñ3Ø×!Ñ! !Ñ$ y°¡|Ñ3ð!
ˆÕr!   c                ó`   • U R                   U R                     [        U R                  5      -  $ ©N)r2   ÚtimeidxÚlenr%   ©r*   s    r   Úseconds_per_sampleÚProfileState.seconds_per_sampleÆ   s%   € Ø×$Ñ$ T§\¡\Ñ2´S¸¿¹Ó5FÑFÐFr!   c                ó&   • U R                   S:X  a  gg)Ns   realr   r   )r(   rB   s    r   r@   ÚProfileState.timeidxÉ   s   € à�:‰:˜Ó ØØr!   )r2   r3   r6   r5   r0   r%   r(   r?   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__r,   r
   r<   rC   Úpropertyr@   Ú__static_attributes__© r!   r   r#   r#   ¡   s1   ‡ ØÓôôò(
òGð ñó ór!   r#   c                  óP   • \ rS rSr0 rSrS rS rS r\	S 5       r
S rS rS	 rS
rg)ÚCodeSiteéÓ   )ÚpathÚlinenoÚfunctionÚsourcec                ó’   • [        U[        5      (       d   eXl        X l        [        U[        5      (       d   eX0l        S U l        g r?   )Ú
isinstanceÚbytesrR   rS   rT   rU   )r*   rR   rS   rT   s       r   r,   ÚCodeSite.__init__Ø   s>   € Ü˜$¤×&Ñ&Ð&Ð&ØŒ	ØŒÜ˜(¤E×*Ñ*Ð*Ð*Ø ŒØˆ�r!   c                ó„   •  U R                   UR                   :H  =(       a    U R                  UR                  :H  $ !    g= f)NF)rS   rR   )r*   Úothers     r   Ú__eq__ÚCodeSite.__eq__à   s6   € ð	Ø—;‘; %§,¡,Ñ.×J°4·9±9ÀÇ
Á
Ñ3JÐJøð	Ùús   ‚8; »?c                óD   • [        U R                  U R                  45      $ r?   )ÚhashrS   rR   rB   s    r   Ú__hash__ÚCodeSite.__hash__æ   s   € Ü�T—[‘[ $§)¡)Ð,Ó-Ð-r!   c                óz   • X4n U R                   U   $ ! [         a    U " XU5      nXPR                   U'   Us $ f = fr?   )ÚcacheÚKeyError)ÚclsrR   rS   rT   ÚkÚvs         r   ÚgetÚCodeSite.geté   sG   € àˆNˆð	Ø—9‘9˜Q‘<ÐøÜó 	Ù�D (Ó+ˆAØ�I‰I�a‰LØŠHð	ús   … ”#:¹:c                ó‚  • U R                   cs   U R                  S-
  n[        U R                  S5       n[	        U5       H!  u  pEXB:X  d  M  UR                  5       U l           O   S S S 5        U R                   c  SU l         U R                   n[        U5      U:”  a  US US-
   S-   nU$ ! , (       d  f       NJ= f!    NQ= f)Nr   Úrbr!   é   s   ...)rU   rS   ÚopenrR   Ú	enumerateÚstriprA   )r*   ÚlengthrS   ÚfpÚiÚlinerU   s          r   Ú	getsourceÚCodeSite.getsourceó   s¬   € Ø�;‰;ÑðØŸ™ q™�Ü˜$Ÿ)™) TÔ*¨bÜ#,¨R¦=™˜Ø�;Ø*.¯*©*«,˜DœKÙ!ñ $1÷ +ð �{‰{Ñ"Ø!�”à—‘ˆÜˆv‹;˜ÓØ˜N˜v¨™zÐ+¨fÑ4ˆFØˆ÷ +Õ*ûð
Ùús.   �%B: ´B)ÁB)Á%B: Â)
B7Â3B: Â7B: Â:B>c                óT   • [         R                  R                  U R                  5      $ r?   )r   rR   ÚbasenamerB   s    r   ÚfilenameÚCodeSite.filename  s   € Ü�w‰w×Ñ §	¡	Ó*Ð*r!   c                óD   • U R                  5       < SU R                  < 3$ )NÚ:)rx   rT   rB   s    r   ÚskipnameÚCodeSite.skipname	  s   € ØŸ-™-ž/¨4¯=«=Ð9Ð9r!   )rT   rS   rR   rU   N)rG   rH   rI   rJ   rc   Ú	__slots__r,   r\   r`   Úclassmethodrh   rt   rx   r|   rM   rN   r!   r   rP   rP   Ó   s>   † Ø€Eà8€Iòòò.ð ñó ðòò&+õ:r!   rP   c                  ó.   • \ rS rSrSrS r\S 5       rSrg)ÚSamplei  ©ÚstackÚtimec                ó   • Xl         X l        g r?   r‚   )r*   rƒ   r„   s      r   r,   ÚSample.__init__  s   € ØŒ
Ø�	r!   c           	     óT  • / nU(       a•  UR                  [        R                  [        R                  " UR
                  R                  5      UR                  [        R                  " UR
                  R                  5      5      5        UR                  nU(       a  M•  [        X25      $ r?   )ÚappendrP   rh   r   ÚsysbytesÚf_codeÚco_filenameÚf_linenoÚco_nameÚf_backr�   )re   Úframer„   rƒ   s       r   Ú
from_frameÚSample.from_frame  sx   € àˆæØ�L‰LÜ—‘Ü×%Ò% e§l¡l×&>Ñ&>Ó?Ø—N‘NÜ×%Ò% e§l¡l×&:Ñ&:Ó;óôð —L‘LˆE÷ ˆeô �eÓ"Ð"r!   N)	rG   rH   rI   rJ   r~   r,   r   r�   rM   rN   r!   r   r�   r�     s    † Ø!€Iòð ñ#ó ó#r!   r�   c                ó�  • [         R                  S:”  a²  [        5       n[         R                  U5        [         R                  [         R
                     n[         R                  R                  [        R                  X5      5        [        R                  " [        R                  [         R                  S5        U[         l        g g )Nr   r/   )Ústater6   r    r<   r2   r@   r%   rˆ   r�   r�   ÚsignalÚ	setitimerÚITIMER_PROFr0   r3   )Úsignumr�   ÚnowÚ	timestamps       r   Úprofile_signal_handlerrš   )  s�   € Ü×Ñ˜QÓÜ‹gˆÜ×Ñ˜cÔ"ä×*Ñ*¬5¯=©=Ñ9ˆ	Ü�‰×ÑœV×.Ñ.¨uÓ@ÔAä×Òœ×+Ñ+¬U×-BÑ-BÀCÔHØ #ŒÕð r!   c                ó  • [         R                  5       (       dÔ  [        5       n[        R	                  U5        [
        R                  " 5       U    n[        R                  [        R                     n[        R                  R                  [        R                  X#5      5        U[        l        [        R                  " [        R                   5        [         R                  5       (       d  MÔ  [         R#                  5         g r?   )Ú
stopthreadÚis_setr    r“   r<   ÚsysÚ_current_framesr2   r@   r%   rˆ   r�   r�   r3   r„   Úsleepr0   Úclear)Útidr˜   r�   r™   s       r   Úsamplerthreadr£   8  s£   € Ü×Ñ×!Ñ!Ü‹gˆÜ×Ñ˜cÔ"ä×#Ò#Ó% cÑ*ˆä×*Ñ*¬5¯=©=Ñ9ˆ	Ü�‰×ÑœV×.Ñ.¨uÓ@ÔAà #ŒÔÜ�
Š
”5×(Ñ(Ô)ô ×Ñ×!Ó!ô ×ÑÕr!   c                 ó(   • [         R                  S:„  $ ©Nr   )r“   r6   rN   r!   r   Ú	is_activer¦   L  s   € Ü×Ñ Ñ"Ð"r!   c                óþ  • U[         l        [         =R                  S-  sl        [         R                  S:X  Ga>  [        5       [         l        [         R
                  nS[         l        U qU S:X  ag  [        R                  " [        R                  [        5        [        R                  " [        R                  U=(       d    [         R                  S5        gU S:X  aš  [        R                  " 5       n[        R                   " 5       R#                  5        VVs/ s H  u  pEXS:X  d  M  UPM     snnS   n[$        R&                  " [(        U4SS9[         l        [         R*                  R-                  5         gggs  snnf )	z:Install the profiling signal handler, and start profiling.r   Nó   signalr/   ó   threadr   r£   )ÚtargetÚargsÚname)r“   r(   r6   r    r3   r5   Úlastmechanismr”   ÚSIGPROFrš   r•   r–   r0   ÚinspectÚcurrentframerž   rŸ   ÚitemsÚ	threadingÚThreadr£   Úthreadr   )Ú	mechanismr(   Úrptr�   rf   Úfr¢   s          r   r   r   S  s  € à„E„KÜ	×Ò˜1ÑÕÜ×Ñ˜aÔÜ %£ŒÔÜ×'Ñ'ˆØ$(ŒÔ!ð "ˆà˜	Ó!Ü�MŠMœ&Ÿ.™.Ô*@ÔAÜ×ÒÜ×"Ñ" C×$@¬5×+@Ñ+@À#õð ˜)Ó#Ü×(Ò(Ó*ˆEÜ!$×!4Ò!4Ó!6×!<Ñ!<Ô!>ÔMÒ!>™˜À!Á*—1Ñ!>ÒMÈaÑPˆCÜ$×+Ò+Ü$¨C¨6¸ñŒEŒLô �L‰L×ÑÕ ð $ð  ùó Ns   ÄE9Ä'E9c                 óx  • [         =R                  S-  sl        [         R                  S:X  Ga  [        S:X  ah  [        R                  " [        R
                  SS5      n [        R                  " [        R                  [        R                  5        U S   [         l        O<[        S:X  a2  [        R                  5         [         R                  R                  5         [         R                  [        5       5        S[         l        [         R"                  R%                  S5      nU(       a  ['        U5        [         $ )z;Stop profiling, and uninstall the profiling signal handler.r   r   r¨   r/   r©   Ns   STATPROF_DEST)r“   r6   r­   r”   r•   r–   r®   ÚSIG_IGNr5   rœ   Úsetr´   Újoinr<   r    r3   r   Úenvironrh   Ú	save_data)r¶   Ústatprofpaths     r   r	   r	   m  sÆ   € ä	×Ò˜1ÑÕÜ×Ñ˜aÔÜ˜IÓ%Ü×"Ò"¤6×#5Ñ#5°s¸CÓ@ˆCÜ�MŠMœ&Ÿ.™.¬&¯.©.Ô9Ø(+¨A©ŒEÕ%Ü˜iÓ'Ü�N‰NÔÜ�L‰L×ÑÔä×Ñœe›gÔ&Ø $ŒÔÜ×'Ñ'×+Ñ+Ð,<Ó=ˆÞÜ�lÔ#ä€Lr!   c           
     óâ  • [        U S5       nUR                  S[        R                  -  5        [        R                   HŽ  nUR
                  nUR                  nU Vs/ s HA  nSR                  UR                  SUR                  -  =(       d    SUR                  /5      PMC     nnUR                  SUSR                  U5      4-  5        M�     S S S 5        g s  snf ! , (       d  f       g = f)Núw+bs   %f %f
ó   s   %déÿÿÿÿs   %d %s
ó    )rm   Úwriter“   r2   r%   r„   rƒ   r»   rR   rS   rT   )rR   ÚfileÚsampler„   rƒ   ÚsÚsitess          r   r½   r½   ‚  sÄ   € Ü	ˆd�EÔ	˜dØ�
‰
�:¤× 6Ñ 6Ñ6Ô7Ü—m”mˆFØ—;‘;ˆDØ—L‘LˆEñ óâ�Að —
‘
˜AŸF™F E¨A¯H©HÑ$4×$:¸¸A¿J¹JÐGÖHÙð ð ð �J‰J�{ d¨E¯J©J°uÓ,=Ð%>Ñ>Ö?ñ $÷ 
Ð	ùò
÷ 
Õ	ús   �AC ÁACÂ'+C ÃC Ã 
C.c                óp  • [        U S5       nUR                  5       R                  5       nS S S 5        WS   R                  5        Vs/ s H  n[	        U5      PM     sn[
        l        / [
        l        USS   H£  nUR                  S5      n[	        US   5      nUSS  n/ nU HL  n	U	R                  S5      n
UR                  [        R                  U
S   [        U
S   5      U
S   5      5        MN     [
        R                  R                  [        X†5      5        M¥     g ! , (       d  f       Nü= fs  snf )Nrk   r   r   rÃ   rÁ   é   )rm   ÚreadÚ
splitlinesÚsplitÚfloatr“   r2   r%   rˆ   rP   rh   Úintr�   )rR   rq   ÚlinesÚvaluers   Úpartsr„   ÚrawsitesrÈ   ÚrawsiteÚ	sitepartss              r   Ú	load_datarÖ   �  sÿ   € Ü	ˆd�DÔ	˜RØ—‘“	×$Ñ$Ó&ˆ÷ 
ð 9>¸a¹¿¹Ô8HÓIÒ8H¨uœe EžlÑ8HÑI„EÔØ„E„MØ�a�b“	ˆØ—
‘
˜5Ó!ˆÜ�U˜1‘X‹ˆØ˜˜�9ˆØˆÛˆGØŸ™ eÓ,ˆIØ�L‰LÜ—‘˜Y q™\¬3¨y¸©|Ó+<¸iÈ¹lÓKöñ  ô 	�‰×ÑœV EÓ0Ö1ò ÷ 
Õ	üò Js   �D"Á	D3Ä"
D0c                ó    • [         R                  S:X  d   S5       e[        R                  R	                  5         [         R                  U 5        g)z¨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.r   s'   Can't reset() while statprof is runningN)r“   r6   rP   rc   r¡   r
   )r+   s    r   r
   r
   £  s:   € ô ×Ñ !Ó#ÐOÐ%OÓOÐ#Ü‡N�N×ÑÔÜ	‡K�K�	Õr!   c               #  ó„   #   • [        5          S v •  [        5         [        5         g ! [        5         [        5         f = f7fr?   )r   r	   r   rN   r!   r   r   r   ®  s)   é € ä	„GðÛäŒÜ�	øô 	ŒÜ�	üs   ‚A Ž' ’A §=½A c                  óN   • \ rS rSrS rS rS rS rS rS r	S r
\S	 5       rS
rg)Ú	SiteStatsi¼  c                ó,   • Xl         SU l        SU l        g r¥   )ÚsiteÚ	selfcountÚ
totalcount©r*   rÜ   s     r   r,   ÚSiteStats.__init__½  s   € ØŒ	ØˆŒØˆ�r!   c                ó.   • U =R                   S-  sl         g ©Nr   )rÝ   rB   s    r   ÚaddselfÚSiteStats.addselfÂ  s   € Ø�Š˜!ÑŽr!   c                ó.   • U =R                   S-  sl         g râ   )rÞ   rB   s    r   ÚaddtotalÚSiteStats.addtotalÅ  s   € Ø�Š˜1ÑŽr!   c                óT   • U R                   [        [        R                  5      -  S-  $ ©Néd   )rÝ   rA   r“   r%   rB   s    r   ÚselfpercentÚSiteStats.selfpercentÈ  s   € Ø�~‰~¤¤E§M¡MÓ 2Ñ2°SÑ8Ð8r!   c                óT   • U R                   [        [        R                  5      -  S-  $ ré   )rÞ   rA   r“   r%   rB   s    r   ÚtotalpercentÚSiteStats.totalpercentË  s   € Ø�‰¤¤U§]¡]Ó!3Ñ3°cÑ9Ð9r!   c                óD   • U R                   [        R                  5       -  $ r?   )rÝ   r“   rC   rB   s    r   ÚselfsecondsÚSiteStats.selfsecondsÎ  s   € Ø�~‰~¤× 8Ñ 8Ó :Ñ:Ð:r!   c                óD   • U R                   [        R                  5       -  $ r?   )rÞ   r“   rC   rB   s    r   ÚtotalsecondsÚSiteStats.totalsecondsÑ  s   € Ø�‰¤×!9Ñ!9Ó!;Ñ;Ð;r!   c                ó<  • 0 nU Hp  n[        UR                  5       HT  u  pEUR                  U5      nU(       d  [        U5      nXbU'   UR	                  5         US:X  d  MD  UR                  5         MV     Mr     UR                  5        Vs/ s H  owPM     sn$ s  snf r¥   )rn   rƒ   rh   rÚ   ræ   rã   Úvalues)re   r%   ÚstatsrÆ   rr   rÜ   ÚsitestatrÇ   s           r   Ú
buildstatsÚSiteStats.buildstatsÔ  s…   € àˆãˆFÜ$ V§\¡\Ö2‘�Ø Ÿ9™9 T›?�ÞÜ(¨›�HØ"*˜$‘Kà×!Ñ!Ô#à˜•6Ø×$Ñ$Ö&ó 3ñ ð !Ÿ<™<œ>Ó*š>�a’™>Ñ*Ð*ùÒ*s   ÂB)rÝ   rÜ   rÞ   N)rG   rH   rI   rJ   r,   rã   ræ   rë   rî   rñ   rô   r   rú   rM   rN   r!   r   rÚ   rÚ   ¼  s9   † òò
òò9ò:ò;ò<ð ñ+ó ó+r!   rÚ   c                  ó0   • \ rS rSrSrSrSrSrSrSr	Sr
S	rg
)ÚDisplayFormatsiç  r   r   rÊ   rl   r   é   é   rN   N)rG   rH   rI   rJ   ÚByLineÚByMethodÚAboutMethodÚHotpathÚ
FlameGraphÚJsonÚChromerM   rN   r!   r   rý   rý   ç  s%   † Ø€FØ€HØ€KØ€GØ€JØ€DØƒFr!   rý   c                ój  • Uc  [         nU c  SSKJn  UR                  n [	        UR
                  5      S:X  a  U R                  S5        gU[        R                  :X  a  [        X 5        OÏU[        R                  :X  a  [        X 5        O¯U[        R                  :X  a  [        X 40 UD6  OŽU[        R                  :X  a  [        X 40 UD6  OmU[        R                   :X  a  [#        X 40 UD6  OLU[        R$                  :X  a  ['        X 5        O,U[        R(                  :X  a  [+        X 40 UD6  O[-        S5      eU[        R$                  [        R(                  4;  aW  U R                  S5        U R                  S[	        UR
                  5      -  5        U R                  S	UR.                  -  5        gg)
z<Print statistics, either to stdout or the given file object.Nr   )Úprocutilr   s   No samples recorded.
zInvalid display formats   ---
s   Sample count: %d
s!   Total time: %f seconds (%f wall)
)r“   Úutilsr  ÚstdoutrA   r%   rÄ   rý   r   Údisplay_by_liner  Údisplay_by_methodr  Údisplay_about_methodr  Údisplay_hotpathr  Úwrite_to_flamer  Úwrite_to_jsonr  Úwrite_to_chromeÚ	Exceptionr2   )rq   ÚformatÚdataÚkwargsr  s        r   r   r   ñ  sV  € à�|Üˆà	�zÝ#à�_‰_ˆÜ
ˆ4�<‰<Ó˜AÓØ
�‰Ð*Ô+Øà”×&Ñ&Ó&Ü˜Õ!Ø	”>×*Ñ*Ó	*Ü˜$Õ#Ø	”>×-Ñ-Ó	-Ü˜TÑ0¨Ó0Ø	”>×)Ñ)Ó	)Ü˜Ñ+ FÓ+Ø	”>×,Ñ,Ó	,Ü�tÑ* 6Ó*Ø	”>×&Ñ&Ó	&Ü�dÕØ	”>×(Ñ(Ó	(Ü˜Ñ+ FÓ+äÐ0Ó1Ð1à”n×)Ñ)¬>×+@Ñ+@ÐAÓAØ
�‰�ÔØ
�‰Ð&¬¨T¯\©\Ó):Ñ:Ô;Ø
�‰Ð6¸×9NÑ9NÑNÕOð Br!   c                óÈ  • [         R                  U R                  5      nUR                  SS S9  UR	                  SS-  5        UR	                  SS-  5        U H„  nUR
                  nSUR                  5       UR                  =(       d    S	UR                  4-  nUR	                  S
UR                  5       UR                  5       UR                  5       U4-  5        M†     g)zoPrint the profiler data with each sample line represented
as one row in a table.  Sorted by self-time per line.Tc                ó"   • U R                  5       $ r?   ©rñ   ©Úxs    r   Ú<lambda>Ú!display_by_line.<locals>.<lambda>  s
   € ¨1¯=©=¬?r!   ©ÚreverseÚkeyó   %5.5s %10.10s   %7.7s  %-8.8s
©s   %  s
   cumulatives   selfr!   ó   %5.5s  %9.9s  %8.8s  %-8.8s
©s   timeó   secondsr$  s   names   %s:%d:%srÂ   ó   %6.2f %9.2f %9.2f  %s
N)rÚ   rú   r%   ÚsortrÄ   rÜ   rx   rS   rT   rë   rô   rñ   )r  rq   rø   ÚstatrÜ   Ú	sitelabels         r   r  r    sÛ   € ô × Ñ  §¡Ó.€EØ	‡J�J�tÑ!:€JÑ;à‡H�HØ*Ø
/ñ	0ôð ‡H�HØ(Ø
4ñ	5ôó
 ˆØ�y‰yˆØØ�M‰M‹OØ�K‰K×˜2Ø�M‰Mð#
ñ 
ˆ	ð
 	�‰Ø&à× Ñ Ó"Ø×!Ñ!Ó#Ø× Ñ Ó"Øð	ñö	
ò r!   c           	     óh  • UR                  SS-  5        UR                  SS-  5        [        R                  U R                  5      n[	        [
        5      nU HH  nX4R                  R                  5       S-   UR                  R                  -      R                  U5        MJ     / nUR                  5        H^  u  pgSnSn	Sn
U H9  nX„R                  5       -  nX”R                  5       -  n	X¤R                  5       -  n
M;     UR                  XhXšU45        M`     UR                  SS S	9  U GH  nUS
   S:  a  M  UR                  SUS
   US   US   US   4-  5        US   R                  SS S	9  US    H²  nUR                  5       S:”  d  M  UR                  R                  S5      n[!        U["        5      (       d  [$        R&                  " U5      nUR                  5       UR                  5       UR                  R(                  =(       d    SU4nUR                  SU-  5        M´     GM     g)z´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.r   r!  r"  r#  ó   :r   Tc                ó   • U S   $ )NrÊ   rN   r  s    r   r  Ú#display_by_method.<locals>.<lambda>Y  s   € °!°A²$r!   r  rl   çš™™™™™©?r%  r   rÊ   r   c                ó"   • U R                  5       $ r?   r  )rr   s    r   r  r,  h  s
   € °Q·]±]´_r!   é   rÂ   s   %33.0f%% %6.2f   line %d: %s
N)rÄ   rÚ   rú   r%   ÚdefaultdictÚlistrÜ   rx   rT   rˆ   r±   rô   rñ   rë   r&  rt   rW   rX   r   ÚbytestrrS   )r  rq   rø   Úgroupedr'  ÚfunctiondataÚfnameÚ	sitestatsÚtotal_cum_secÚtotal_self_secÚtotal_percentrT   rU   Ú	stattuples                 r   r  r  6  s'  € ð ‡H�HØ*Ø
/ñ	0ôð ‡H�HØ(Ø
4ñ	5ôô
 × Ñ  §¡Ó.€Eäœ$Ó€GÛˆØ—	‘	×"Ñ"Ó$ tÑ+¨d¯i©i×.@Ñ.@Ñ@ÑA×HÑHÈÖNñ ð €LØ#ŸM™MžOÑˆØˆØˆØˆÛˆDØ×.Ñ.Ó0Ñ0ˆMØ×.Ñ.Ó0Ñ0ˆNØ×-Ñ-Ó/Ñ/ŠMñ ð
 	×ÑØ >À)ÐLö	
ñ ,ð ×Ñ˜d©ÐÑ7ä ˆØ�A‰;˜ÓÙØ
�‰Ø&à˜‘Ø˜‘Ø˜‘Ø˜‘ð	ñô	
ð 	�‰×Ñ Ñ+DÐÑEØ˜Q”KˆDà×ÑÓ! AÕ%ØŸ™×,Ñ,¨RÓ0�Ü! &¬%×0Ñ0Ü%×-Ò-¨fÓ5�Fð ×$Ñ$Ó&Ø×$Ñ$Ó&Ø—I‘I×$Ñ$×*¨Øð	�	ð —‘Ð:¸YÑFÖGô  ò !r!   c                ó  • Uc  [        S5      eS nSU;   a  UR                  S5      u  pBSn0 n0 nU R                   Hª  n[        UR                  5       HŽ  u  pšU
R
                  U:X  d  M  U(       a  U
R                  5       U:X  d  M4  US-  nU	[        UR                  5      S-
  :w  a%  UR                  U	S-      nX¶;   a
  Xk   S-   Xk'   OSXk'   X§;   a  Xz   S-   Xz'   MŠ  SXz'   M�     M¬     UR                  5        VVs/ s H  u  p¼X¼4PM
     nnnUR                  SS S9  U H™  u  p¼UR                  SXÅ-  S	-  [        R                  " UR                  5       5      [        R                  " UR
                  5      UR                  =(       d    S
[        R                  " UR                  S5      5      4-  5        M›     [         R#                  U R                  5      nU Vs/ s HH  nUR$                  R
                  U:X  d  M  U(       a   UR$                  R                  5       U:X  d  MF  UPMJ     nnSnSnSnSnU HO  nUUR'                  5       -  nUUR)                  5       -  nUUR+                  5       -  nUUR-                  5       -  nMQ     UR                  S[        R                  " U=(       d    S5      [        R                  " U5      UUUU4-  5        UR                  5        VVs/ s H
  u  nnUU4PM     nnnUR                  SS S9  U HX  u  nnUR                  SXÅ-  S	-  UR                  =(       d    S
[        R                  " UR                  S5      5      4-  5        MZ     g s  snnf s  snf s  snnf )NzInvalid functionr*  r   r   Tc                ó   • U S   $ râ   rN   r  s    r   r  Ú&display_about_method.<locals>.<lambda>™  s   € ¨Q¨qªTr!   r  s   %6.2f%%   %s:%s   line %s: %s
rê   rÂ   é2   sA   
    %s:%s    Total: %0.2fs (%0.2f%%)    Self: %0.2fs (%0.2f%%)

s   ___c                ó   • U S   $ râ   rN   r  s    r   r  r=  Å  s   € ¨a°ªdr!   s           %6.2f%%   line %s: %s
)r  rÍ   r%   rn   rƒ   rT   rx   rA   r±   r&  rÄ   r   Úfsencoder‰   rS   rt   rÚ   rú   rÜ   rô   rñ   rë   rî   )r  rq   rT   r  rx   Úrelevant_samplesÚparentsÚchildrenrÆ   rr   rÜ   ÚparentÚcountrø   rÇ   r7  r8  Útotal_self_percentÚtotal_cum_percentr'  Úchilds                        r   r  r  z  sP  € ØÑÜÐ*Ó+Ð+à€HØˆxÓØ%Ÿ^™^¨DÓ1ÑˆàÐØ€GØ€Hà—,”,ˆÜ  §¡Ö.‰GˆAØ�}‰} Õ(Þ §¡£°8Õ ;à  AÑ%Ð Øœ˜FŸL™LÓ)¨AÑ-Ó-Ø#Ÿ\™\¨!¨a©%Ñ0�FØÓ(Ø*1©/¸AÑ*=˜šà*+˜™àÓ#Ø%-¡^°aÑ%7�H“Nà%&�H“Nó /ñ ð$ 5<·M±M´OÔD²O¡= 6�‹±O€GÑDØ‡L�L˜¡>€LÑ2Û ‰ˆØ
�‰Ø.àÑ(¨3Ñ.Ü×!Ò! &§/¡/Ó"3Ó4Ü×!Ò! &§/¡/Ó2Ø—‘×# Ü×!Ò! &×"2Ñ"2°2Ó"6Ó7ðñö		
ñ !ô × Ñ  §¡Ó.€Eñ óâˆAØ�6‰6�?‰?˜hÑ&ó 	
ö ˜QŸV™VŸ_™_Ó.°(Ñ:÷ 	
Ùð 
ð ð €MØ€NØÐØÐÛˆØ˜×*Ñ*Ó,Ñ,ˆØ˜$×*Ñ*Ó,Ñ,ˆØ˜d×.Ñ.Ó0Ñ0ÐØ˜T×.Ñ.Ó0Ñ0Òñ	 ð ‡H�HØOä×Ò˜h×0¨&Ó1Ü×Ò˜hÓ'ØØØØð
ñ	
ô
ð 4<·>±>Ô3CÔDÒ3C¡< 5¨%�˜“Ñ3C€HÑDØ‡M�M˜$¡N€MÑ3Û ‰ˆˆuØ
�‰Ø.àÑ(¨3Ñ.Ø—‘×" Ü×!Ò! %§/¡/°"Ó"5Ó6ðñö	
ò !ùó] Eùòùó: Es   Ã=M2Ç"M8È#M8È+M8Ë.M=c                óv  ^^^^^^	•  " U4S jS5      mT" S 5      mU R                   S   R                  nU R                    H>  nTR                  UR                  S S S2   UR                  U-
  5        UR                  nM@     UR	                  SS5      m	UUUUU	4S jmTR
                  S:”  a  T" TSS5        g g )	Nc                  ó(   >• \ rS rSrS rU 4S jrSrg)Ú display_hotpath.<locals>.HotNodeiÒ  c                ó,   • Xl         SU l        0 U l        g r¥   )rÜ   rE  rC  rß   s     r   r,   Ú)display_hotpath.<locals>.HotNode.__init__Ó  s   € ØŒIØˆDŒJØˆD�Mr!   c                óò  >• U =R                   U-  sl         US   nU R                  R                  U5      nU(       d  T" U5      nX@R                  U'   [        U5      S:”  a€  SnU[        U5      :  aJ  X   R	                  5       [
        ;   a0  US-  nU[        U5      :  a  X   R	                  5       [
        ;   a  M0  U[        U5      :  a  UR                  XS  U5        g g U=R                   U-  sl         g r9   )rE  rC  rh   rA   r|   ÚskipsÚadd)r*   rƒ   r„   rÜ   rH  rr   ÚHotNodes         €r   rP  Ú$display_hotpath.<locals>.HotNode.addØ  sÍ   ø€ Ø�JŠJ˜$Ñ�JØ˜‘8ˆDØ—M‘M×%Ñ% dÓ+ˆEÞÙ ›�Ø&+—‘˜dÑ#ä�5‹z˜A‹~Ø�àœ#˜e›*“n¨©×):Ñ):Ó)<ÄÓ)EØ˜‘F�Að œ#˜e›*“n¨©×):Ñ):Ó)<ÄÕ)Eà”s˜5“z“>Ø—I‘I˜e B˜i¨Õ.ð "ð —’˜tÑ#–r!   )rC  rE  rÜ   N)rG   rH   rI   rJ   r,   rP  rM   )rQ  s   €r   rQ  rK  Ò  s   ø† ò	÷
	$ð 	$r!   rQ  r   rÂ   ÚshowtimeTc                ó   >• U R                   nU R                  R                  5        Vs/ s H#  oDR                  TTR                  -  :¼  d  M!  UPM%     nnU(       GaÊ  US-  S-
  nUR	                  5       S-   R                  S5      nUR                  nSR                  U5      U(       a  SOS-   S-   T(       a  S	U R                  -  OS-   S
-   n	U	U R                  TR                  -  S-  UU4-  n
[        SS[        U
5      -
  5      nSnUS:X  a  SnSnUUSR                  U5      UR                  b  UR                  OSSR                  [        SS[        [        UR                  5      5      -
  5      5      UR                  S5      4-  nX®-   n[        U R                  R                  5        Vs/ s H  oDR                  PM     sn5      nU R                  U-
  STR                  -  :”  a	  SU-   S-   nOU R                  U-
  S:X  a  SU-   S-   nTR                  US-   5        Un[        U5      S:”  d  U(       a  US-  nUR                  SS S9  U H  nT" UU[        U5      S:„  5        M     g s  snf s  snf )NrÊ   r   r*  é   r!   ó   \ó   |s    %4.1f%%s    %5.2fss     %s %srê   r   é7   s   , s   %s%s %d: %s%ss   linerÂ   r   é   gš™™™™™¹?s   [91ms   [0ms   [90mó   
Tc                ó   • U R                   $ r?   )rE  r  s    r   r  Ú1display_hotpath.<locals>._write.<locals>.<lambda>&  s   € ¸¿ºr!   r  )rÜ   rC  r÷   rE  rx   ÚljustrT   ÚmaxrA   ÚrjustrS   Ústrrt   ÚsumrÄ   r&  )ÚnodeÚdepthÚmultiple_siblingsrÜ   ÚcÚvisiblechildrenÚindentrx   rT   ÚlistpatternÚ
liststringÚspacing_lenÚprefixÚcodepatternÚ
codestringÚfinalstringÚchildrensamplesÚnewdepthrH  Ú_writerq   ÚlimitÚrootrS  s                      €€€€€r   rq  Údisplay_hotpath.<locals>._writeò  sp  ø€ Ø�y‰yˆà—}‘}×+Ñ+Ô-ó
Ú-�!·±¸UÀTÇZÁZÑ=OÑ1P�AÑ-ð 	ð 
÷ Ø˜Q‘Y ‘]ˆFØŸ™›¨$Ñ.×5Ñ5°bÓ9ˆHØ—}‘}ˆHð —	‘	˜&Ó!Þ-‘5°4ñ9àñö /7�: §
¡
Ò*¸CñAð ñ	ð ð %Ø—
‘
˜TŸZ™ZÑ'¨#Ñ-ØØð(ñ ˆJô ˜a ¤c¨*£oÑ!5Ó6ˆKØˆFØ˜aÓØ�à*ˆKØ$ØØ—‘˜kÓ*Ø#Ÿ{™{Ñ6�—’¸BØ—	‘	œ#˜a ¤S¬¨T¯[©[Ó)9Ó%:Ñ!:Ó;Ó<Ø—‘˜rÓ"ð(ñ ˆJð %Ñ1ˆKÜ!°D·M±M×4HÑ4HÔ4JÓ"KÒ4J¨q§7¤7Ñ4JÑ"KÓLˆOà�z‰z˜OÑ+¨s°T·Z±ZÑ/?Ó@Ø)¨KÑ7¸*ÑD‘à—‘˜oÑ-°Ó2Ø)¨KÑ7¸*ÑD�Ø�H‰H�[ 5Ñ(Ô)àˆÜˆÓ !Ó#Ö'8Ø˜‰MˆHà×Ñ TÑ/@ÐÑAÛ$ˆEÙ�5˜(¤C¨Ó$8¸1Ñ$<Ö=ò %ùòg
ùòJ #Ls   ª I6ÁI6Æ4I;F)r%   r„   rP  rƒ   rh   rE  )
r  rq   rr  r  ÚlasttimerÆ   rQ  rq  rs  rS  s
    ``   @@@@r   r  r  Ñ  s¡   ý€ ÷$ô $ñ2 �4‹=€DØ�|‰|˜A‰×#Ñ#€HØ—,”,ˆØ�‰�—‘™d ˜dÑ# V§[¡[°8Ñ%;Ô<Ø—;‘;Šñ ð �z‰z˜* dÓ+€H÷6>ñ 6>ðp ‡z�z�Aƒ~Ùˆt�Q˜Õð r!   c                óî  • Uc  [         R                  S   S-   n[        R                  R	                  U5      (       d&  UR                  SU-  5        UR                  S5        g 0 nU R                   H]  nUR                   Vs/ s H  owR                  PM     nnUR                  5         SR                  U5      n	X•;   a  XY   S-   XY'   MY  SXY'   M_     [        R                  " 5       u  p«[        US5       nUR                  5        H  u  p�UR                  SX�4-  5        M     S S S 5        Uc  S	n[        R                  " S
X³4-  5        UR                  SU-  5        g s  snf ! , (       d  f       NG= f)Ns   HOMEs   /flamegraph.pls   error: missing %s
s8   get it here: https://github.com/brendangregg/FlameGraph
ó   ;r   rÀ   s   %s %d
s   ~/flamegraph.svgs   perl ~/flamegraph.pl %s > %ss   Written to %s
)r   r¼   r   rR   ÚexistsrÄ   r%   rƒ   rT   r  r»   r   Úmkstemprm   r±   Úsystem)r  rq   Ú
scriptpathÚ
outputfiler  rÐ   rÆ   rÇ   rÈ   rs   ÚfdrR   rÅ   rE  s                 r   r  r  .  s:  € ØÑÜ×%Ñ% gÑ.Ð1BÑBˆ
Ü�7‰7�>‰>˜*×%Ñ%Ø
�‰Ð'¨*Ñ4Ô5Ø
�‰ÐMÔNØà€EØ—,”,ˆØ%+§\¢\Ó2¢\ —”¡\ˆÐ2Ø�‰ŒØ�y‰y˜ÓˆØ‹=Ø™+¨™/ˆE‹KàˆE‹Kñ ô ×ÒÓ!�H€Bä	ˆd�EÔ	˜dØ Ÿ;™;ž=‰KˆDØ�J‰J�z T MÑ1Ö2ñ )÷ 
ð ÑØ(ˆ
ä‡I‚IÐ-°Ð0BÑBÔCØ‡H�HÐ *Ñ,Õ-ùò% 3÷ 
Õ	ús   ÂE!Ã6/E&Å&
E4c                óH  • U [         ;   a	  [         U    $ [        R                  R                  [        R
                  S5      S   nU/[        R                  -    H<  nU[        R
                  -   nU R                  U5      (       d  M.  U [        U5      S n   O   U [         U '   U $ )z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.rÊ   r   N)
Ú
_pathcacher   Ú__file__Úrsplitr   Úseprž   rR   Ú
startswithrA   )rR   ÚhgpathÚprk  s       r   Úsimplifypathr†  P  s�   € ð
 ŒzÓÜ˜$ÑÐÜ×Ñ×%Ñ%¤b§f¡f¨aÓ0°Ñ3€FØˆXœŸ™Ô ˆØ”R—V‘V‘ˆØ�?‰?˜6×"Ó"Øœ˜F›˜Ð&ˆDÙñ	 !ð
 „JˆtÑØ€Kr!   c           	     óò  • / nU R                    H˜  n/ nUR                   Hf  nUR                  [        R                  " UR
                  5      UR                  =(       d    S[        R                  " UR                  5      45        Mh     UR                  UR                  U45        Mš     [        R                  " U5      n [        U [        5      (       d  U R                  S5      n UR                  U 5        g )NrÂ   úutf-8)r%   rƒ   rˆ   r   ÚsysstrrR   rS   rT   r„   ÚjsonÚdumpsrW   rX   ÚencoderÄ   )r  rq   r%   rÆ   rƒ   r�   s         r   r  r  a  s²   € Ø€Gà—,”,ˆØˆà—\”\ˆEØ�L‰Lä—O’O E§J¡JÓ/Ø—L‘L×& BÜ—O’O E§N¡NÓ3ðöñ "ð 	�‰˜Ÿ™ UÐ+Ö,ñ ô �:Š:�gÓ€DÜ�dœE×"Ñ"Ø�{‰{˜7Ó#ˆà‡H�HˆT…Nr!   c                óœ  ^^^^^^^^^^^• / m[         R                  " 5       m[         R                  " 5       m0 m/ mUUU4S jmSm[        5       mU R                  S   R                  U R                  S   R                  -
  nUT-  m[        UT-  T5      mUUUUUUUUU4	S jnU R                   GHI  m[        S TR                   5       5      n[         R                  " U5      nTU:X  a  M>  T(       aO  U(       aH  TS   US   :X  a<  TR                  5         UR                  5         T(       a  U(       a  TS   US   :X  a  M<  T(       a  U" 5         T(       a  M  [        U5       Hy  nTR                  TR                  [        T5      45        TR                  U5        Uu  pšT" [        T5      5      nTR                  [        SU
U	TR                  S-  USS	95        M{     [         R                  " U5      mGML     T(       a  U" 5         T(       a  M  [        T5       VVs/ s H  u  pÍUT;  d  M  UPM     nnn[         R                  " S
 [        T5       5       5      n[         R"                  " [        XïS9SS9n [%        U [&        5      (       d  U R)                  S5      n UR+                  U 5        UR+                  S5        g s  snnf )Nc                óØ   >• U (       d  g U T;   a  TU    $ T" U SS  5      n[        T5      nUTU '   TR                  [        U S   S   SU S   -  S95        Ub  TS   R                  US9  U$ )Nr   r   z%s %s)Úcategoryr¬   rÂ   )rD  )rA   rˆ   ÚdictÚupdate)rƒ   rD  ÚmyidÚid2stackÚstack2idÚstackids      €€€r   r•  Ú write_to_chrome.<locals>.stackid„  s�   ø€ ÞØØ�HÓØ˜E‘?Ð"Ù˜˜q˜r˜Ó#ˆÜ�8‹}ˆØˆ�‰Ø�‰œ e¨A¡h¨q¡k¸À%ÈÁ(Ñ8JÑKÔLØÑØ�R‰L×Ñ vÐÑ.Øˆr!   r1   rÂ   r   c                 óD  >	• T" [        T
5      5      n T
R                  5       u  pT	R                  5       u  p4TR                  U-
  nTUs=::  a  T::  a=  O  O:[        UT-   TR                  5      nTR	                  [        SUUU US-  SS95        g TR                  U5        g )NÚEç    €„.Ar   )Úphr¬   ÚcatÚsfÚtsÚpid)ÚtupleÚpopleftr„   r^  rˆ   r�  rP  )ÚoldsidÚoldcatÚoldfuncÚoldtimeÚoldidxÚdurationÚ
sampletimeÚ	blacklistÚclampÚlastseenÚ	laststackÚmaxthresholdÚminthresholdrÆ   r%   r•  s          €€€€€€€€€r   ÚpoplastÚ write_to_chrome.<locals>.poplast§  sš   ø€ Ùœ˜yÓ)Ó*ˆØ#×+Ñ+Ó-‰ˆØ"×*Ñ*Ó,‰ˆØ—;‘; Ñ(ˆØ˜8Õ3 |Ö3ä˜W u™_¨f¯k©kÓ:ˆJØ�N‰NÜØØ ØØØ! CÑ'Øñõ	ð �M‰M˜&Õ!r!   c              3  óä   #   • U  Hf  nS [        [        R                  " UR                  5      5      UR                  =(       d    S4-  [        R                  " UR
                  5      4v •  Mh     g7f)z%s:%drÂ   N)r†  r   r‰  rR   rS   rT   )Ú.0r�   s     r   Ú	<genexpr>Ú"write_to_chrome.<locals>.<genexpr>À  s]   é € ð 

ò &�ð ä ¤§¢°·±Ó!<Ó=Ø—L‘L×& Bðñô
 —’ §¡Ó/õò &ùs   ‚A.A0ÚBr™  )rš  r¬   r›  r�  rœ  rž  c              3  ó@   #   • U  H  u  p[        U5      U4v •  M     g 7fr?   )r`  )r±  rf   rg   s      r   r²  r³  è  s   é € ð %Ú"5™˜ŒˆQ‹��Ò"5ùs   ‚)ÚtraceEventsÚstackFramesr   )rg  rˆ  rZ  )ÚcollectionsÚdequerº   r%   r„   r^  rŸ  rƒ   ÚpopÚreversedÚ
appendleftrA   rˆ   r�  rn   ÚOrderedDictrŠ  r‹  rW   rX   rŒ  rÄ   )r  rq   r­  r¬  Ú	totaltimer®  rƒ   Úqstackr·   rR   r¬   ÚsidÚidxrÆ   ÚeventsÚframesr¨  r©  r“  rª  r«  r%   r”  r•  s     ``         `  @@@@@@@@r   r  r  y  si  ÿú€ Ø€GÜ×!Ò!Ó#€IÜ× Ò Ó"€Hð
 €HØ€H÷ð& €Eô “€IØ—‘˜RÑ ×%Ñ%¨¯©°Q©×(<Ñ(<Ñ<€IØ˜|Ñ+€LÜ�y <Ñ/°Ó7€L÷"õ "ð0 —,•,ˆÜñ 

ð  Ÿšó

ó 

ˆô ×"Ò" 5Ó)ˆØ˜ÓÙÞžF y°¡}¸¸r¹
Ó'BØ�M‰MŒOØ�J‰JŒLö žF y°¡}¸¸r¹
Õ'Bö ÙŒI÷ ˆiä˜&Ö!ˆAØ×Ñ §¡¬c°'«lÐ ;Ô<Ø× Ñ  Ô#Ø‰JˆDÙœ% 	Ó*Ó+ˆCØ�N‰NÜØØØØ—{‘{ SÑ(ØØñö	ñ "ô  ×%Ò% eÓ,‹	ñG öH ÙŒ	÷ ˆ)ô #,¨GÔ"4ôÚ"4‘;�3¸À9Ñ8L�Ñ"4ð ñ ô ×$Ò$ñ %Ü"+¨HÔ"5ó%ó €Fô �:Š:”d vÑBÈ1ÑM€DÜ�dœE×"Ñ"Ø�{‰{˜7Ó#ˆØ‡H�HˆT„NØ‡H�HˆU…Oùós   È$KÈ4Kc                 ó   • [        S5        g )NaÏ  
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.))ÚprintrN   r!   r   Ú
printusagerÆ  ò  s   € Ü	ð	?õr!   c                óÂ  • U c  [         R                  n [        U 5      S:X  a  [        5         g0 nSnS US'   U S   S:X  a  [        R
                  US'   O‰U S   S:X  a  [        R                  US'   OlU S   S:X  a  [        R                  US'   OOU S   S	:X  a  [        R                  US'   U S   US'   S
nO(U S   S:X  a  [        R                  US'   O[        5         g [        R                  " [        R                  US  S/ SQ5      u  p4SUS'   S nU HW  u  pxUS;   a  [!        U5      US'   M  US;   a  UnM%  US;   a  X�S'   M1  US;   a  X�S'   M=  US;   a  [        5           g SU-  5       e   U(       d  [        S5        g[#        US9  [%        S0 [        R&                  " U5      D6  g! [        R                   a  n[        U5        [        5          S nAgS nAff = f)Nr   r   rÊ   s   functionÚhotpaths   formatrÐ   Ú	functionsrT   rl   Úflames	   hl:f:o:p:)s   helps   limit=s   file=s   output-file=s   script-path=r-  s   limit)z-lz--limit)z-fz--file)z-oz--output-files
   outputfile)z-pz--script-paths
   scriptpath)z-hÚhelpzunhandled option %szmust specify --file to load)rR   rN   )rž   ÚargvrA   rÆ  rý   r  r   r  r  r  r   ÚgetoptbÚsysargvÚgetoptÚerrorrÅ  rÎ   rÖ   r   Ú	strkwargs)	rÌ  ÚdisplayargsÚoptstartÚoptsr«   ÚmsgrR   ÚorÑ   s	            r   Úmainr×  	  sæ  € Ø�|Ü�x‰xˆä
ˆ4ƒy�Aƒ~ÜŒØà€Kà€HØ#€K�ÑØˆA�w�)ÓÜ!/×!7Ñ!7ˆ�IÒØ	ˆa‰�GÓ	Ü!/×!6Ñ!6ˆ�IÒØ	ˆa‰�KÓ	Ü!/×!8Ñ!8ˆ�IÒØ	ˆa‰�JÓ	Ü!/×!;Ñ!;ˆ�IÑØ#'¨¡7ˆ�KÑ Ø‰Ø	ˆa‰�GÓ	Ü!/×!:Ñ!:ˆ�IÒäŒØð	Ü×%Ò%Ü×Ñ˜X˜YÐ'ØÚLó
‰
ˆð !€K�ÑØ€DÛ‰ˆØÐ!Ó!Ü$)¨%£LˆK˜Ó!ØÐ"Ó"ØŠDØÐ)Ó)Ø).˜Ó&ØÐ)Ó)Ø).˜Ó&Ø�.Ó ÜŒLÙà3Ð/°!Ñ3Ó3�5ñ ö ÜÐ+Ô,Øä�4ÒäÑ.Œh× Ò  Ó-Ò.àøô= �<‰<ó ÜˆcŒ
ÜŒÜûðús   Ã-F+ Æ+GÆ?GÇGÚ__main__)r©   r'   r?   )Nrl   N)r-  )NN)g{®Gázt?g+‡ÙÎ÷ï?)7Ú__doc__Ú
__future__r   r¸  Ú
contextlibrÏ  r¯   rŠ  r   r”   rž   r²   r„   Útypingr   Ú r   r   r0  ÚcontextmanagerÚ__all__rO  r    r#   r“   rP   r�   rš   ÚEventrœ   r£   r¦   r­   r   r	   r½   rÖ   r
   r   rÚ   rý   r   r  r  r  r  r  r  r†  r  r  rÆ  r×  rG   ÚexitrN   r!   r   Ú<module>râ     s[  ðñ0Nõ` #ã Û Û Û Û Û 	Û Û 
Û Û õ÷ð
 ×%Ñ%€Ø×*Ñ*€â
:€ò	€ò*+÷,ñ ,ñ^ 	‹€÷7:ñ 7:÷t#ñ #ò8	$ð �_Š_Ó€
òò(#ð €ô!ò4ò*
@ò2ô(ð ñó ð÷(+ñ (+÷Vñ ô!PòH
òBAHôHT
ônZôz.ð> €
òò"ô0vòrô.AðH ˆzÓØ‡H‚H‰T‹VÕð r!   