403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.66
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /Python315/Lib/profiling/sampling/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /Python315/Lib/profiling/sampling/__pycache__/sample.cpython-315.pyc
R
>lqjAjc���]PHs]PHs]PHs]PHs]PHs]PHs]PHs]QHGs]QH%G
s
]QH,Gs]QH4GsGs]QH@Gs]QHHGs]QHPGs\O,Q2s]Q	H`GsGsGsGsGs]Q
HxGs]QH�G!s!\OFQ2PIs$]�s%Q
s&Qs'QQ2s(Qs)QPQP
QP
Q\QPQP
QP	QP
QP
-	Qks*QP
Q\QPQP
QP	QP
QP
-Qks+QPQP
QP
Q\QPQP
QP	QP
QP
-	Qks,P!\"cPs!Kvh9h)�)�deque)�
ANSIColors)�PstatsCollector)�CollapsedStackCollector�FlamegraphCollector)�HeatmapCollector)�GeckoCollector)�BinaryCollectorc#� �U%c)UO2Pw�UO2P!Pw�	P!SO2h9h3h)zLContext manager to pause/resume threads around sampling if blocking is True.)�
pause_threads�resume_threads)�unwinder�blockings&&�.C:\Python315\\Lib\profiling\sampling\sample.py�_pause_threadsrs<������� �	&���#�#�%�
��
�#�#�%�s�	A�A�;�A�A
�
A)�PROFILING_MODE_WALL�PROFILING_MODE_CPU�PROFILING_MODE_GIL�PROFILING_MODE_ALL�PROFILING_MODE_EXCEPTION)�fmt)�LiveStatsCollector�Py_GIL_DISABLEDi c��[OQ6wf$[O[O6XcU![
OUP
Q5oSTt,tFD#o[
OU2%fJ!UMJ%	oo[U2]6Xc
U]*!U!ttoh[[1c&o[QSQ[O02SgPo=hh9h)acOn Windows, if pid is a venvlauncher process, return the child Python PID.

The venvlauncher (used as python.exe in venvs) spawns the real Python
interpreter as a child process via CreateProcessW. The RemoteUnwinder
needs the child's PID, not the launcher's.

Returns the original pid if not on Windows, not a venv launcher,
or no child process is found.
�nt)�	recursivez/Failed to initialize profiler from virtualenv: z(
Try running with the base interpreter: )
�os�name�sys�prefix�base_prefix�_remote_debugging�get_child_pids�is_python_process�len�OSError�RuntimeError�
SystemExit�_base_executable)�pid�children�child�python_children�errs&    r�_resolve_python_pidr.6s���
�w�w�$��#�*�*����7��
��$�3�3�C�5�I��'�
�'�e� �2�2�5�9�
�E�x�	�
����1�$�"�1�%�%�%��J��
��
�\�"���=�c�U�C6�69�6J�6J�5K�
M�
��	���s;�B&� B!�=B!�B&�B&�!B&�&C�6C�7 C�Cc�`�\sQs]RsnQ\QP
QP	QP
QP	QP
QP
-QksQ	sQQ
ksQP-QksQQP
-Q
kks	Qs
QsQsQs
UsP!)�SampleProfiler�mode�native�gc�opcodes�skip_non_matching_threads�
collect_statsrc��[U2UmV mV0mV@mV�mV�mUOVVVx2Um[]dQ5Um]Um
P
UmP![co[S2SgPo=hh9h)N)�maxlen)r.r)�sample_interval_usec�all_threadsr1r6r�
_new_unwinderr
r&r'r�sample_intervals�
total_samples�realtime_stats)�selfr)r9r:r1r2r3r4r5r6rr-s&&&&$$$$$$$ r�__init__�SampleProfiler.__init__Ss���&�s�+���$8�!�&���	�*�� �
�	+� �.�.�v�7�^�D�M�!&�S� 1������#�����	+��S�/�s�*��	+�s�A)�)	B�3B�4B�Bc��-o[%fUO%cUOUQ$L[UO2UQ$[OUO
1QUOQUQUQUQUQP	QUO-U@!)	r:�only_active_threadr1r2r3r4r5�cache_frames�stats)�_FREE_THREADED_BUILDr:�boolr!�RemoteUnwinderr)r1r6)r?r2r3r4r5�kwargss&&&&& rr;�SampleProfiler._new_unwindercs�������4�#3�#3�#3�$(�$4�$4�F�=�!�+/��0@�0@�+A�F�'�(� �/�/��H�H�

����

��

��	

�
�

�'@�

��

��$�$�

��

�
	
�c�r�[UOUO29^tt^2UQ6Xc%UOO2ttPPP2!UQ6Xc%UOO	2ttPPP2!UOO2ttPPP2!)%fhP!9h)�all�running)rr
r�get_all_awaited_by�get_async_stack_trace�get_stack_trace�r?�async_awares&&r�_get_stack_trace�SampleProfiler._get_stack_tracevsz��
�D�M�M�4�=�=�
9�
9��e�#��}�}�7�7�9�:�
9��i�'��}�}�:�:�<�	:�
9�
�=�=�0�0�2�:�
9�
9�
9�s(�B%�B%�B%�B%�B%�%B6	�.B6	rSc�(�UOUQ5!)z7Return a single stack snapshot from the target process.�rS)rTrRs&$r�
dump_stack�SampleProfiler.dump_stack~s���$�$��$�=�=rKc��	````�UOQ*o]o]oP
o]o[O29q�S	oQoS	o
[RQP
2P	IoPn]nU%c,LPnUUUU1QkoUdV�6Cc�[	RQ2%cRO
%fCL~[O2o[
UQ*2oU
U6�c0U
U*
Q*oUQ6�c[OU2CLU
U6c�UOUQ5oU%c>UR6wc
U2UnR]*
nROU2R[6�cU2LROU2U]6�cwUU*
oUO*OQU*2U9O,]*
tmUO.%c!UU
*
U6�cUO12So
SoU]*
oV�*
o
[O2U	*
oCJ�U2UO.%c%[7UO*2]6�c[52U]6�c	VX*L]oU]6�cVe*]d*L]o[
V�*2oU]6�cUU*
U*]d*L]o[8PI9%c[;R[82oU%f�U]6XcPLQ	o
UQ
QUQ
[=U]2Q02[5Q[=U]2Q02[5Q[=U]202UO>%cUOA2[;R[B2%cUOER2[	RQ2%c,ROGUOUUUUUOHQ5UU6cRU%fHU%f>[5QUU*
QUQ[=UU*
U*]d*]2Q02P!P!P!P![coSS	*
oPo=CJPo=h[[[[ 1c'S2RO#2S]*
oPnCK	[$c+o['SO(2%fPo=CJ�SPgPo=hh9h[2c.P	o[O2S	*
o[5Q2CK�h9hS2h9h)�@B��?�aggregatingc�N:�R]6XcP!]nRo,nRORUQ5P!)r)�
timestamps_us)�collect)�ts�	collector�
pending_count�pending_timestamps�
prev_stacks ����r�
flush_pending�,SampleProfiler.sample.<locals>.flush_pending�s1�����!���M�#�B�!#�����j���;rKrNg�������?g-C��6?rWzInterrupted by user.�sz	Captured �nz samplez in z secondsz
Sample rate: z samples/seczError rate: �	set_stats)r1zWarning: missed z$ samples from the expected total of � (�%))%r9�time�perf_counter�getattr�hasattrrN�int�sleeprT�append�MAX_PENDING_SAMPLESr`�ProcessLookupErrorr&�UnicodeDecodeError�MemoryErrorr%�collect_failed_sample�	Exception�_is_process_runningr)r<r=r>�_print_realtime_stats�KeyboardInterrupt�printr$r�
isinstancerr6�_print_unwinder_statsr	�_print_binary_statsrjr1)r?rb�duration_secrS�sample_interval_sec�num_samples�errors�interrupted�running_time_sec�
start_time�	next_time�last_sample_time�realtime_update_interval�last_realtime_updater]rf�current_time�current_time_us�
sleep_time�stack_frames�e�actual_interval�sample_rate�
error_rate�expected_samples�missed_samples�is_live_moderhrcrdres&f&$                        @@@r�sample�SampleProfiler.sample�s����"�7�7�)�C����������!%�!2�!2�!4�4�
�%��#&� �)���i���>�$�F���
��
�#.�R�D��	<�	<�C	��&�*:�*I��9�i�0�0��9J�9J�9J��#�0�0�2��"%�l�Y�&>�"?���|�+�"+�l�":�c�!A�J�!�F�*��
�
�:�.����-�*�'+�'<�'<�(3�(=�(��'�+�z�9� -��-9�
�)�Q�.�M�.�5�5�o�F�,�0C�C� -���%�-�-�l�;�#�Q��*6�9I�*I���-�-�4�4��/�1���*�*�a�/�*�!�/�/�/�!-�0D�!D�7�!8�!�6�6�8�3?�0�'3�$��1�$�K��4�I�#'�#4�#4�#6��#C� �y+J�D
�O�����3�t�'<�'<�#=��#A��G�8H�1�8L�k�4�RS��5@�1�_�f�*�c�1�!�
��/�E�F��Vf�ij�Vj�*�[�8�<L�L�s�R�pq��*��5�c�c�*�Y�Pb�:c���!�Q�&��C�A��I�k�!�_�G�A�3�d�3�?O�QR�;S�:T�T\�]�^��M�#�k�1�"5�!6�l�C�D��L��Z��!3� 4�5�6��!�!�!��*�*�,��)�_�5�5��(�(��3��9�k�*�*����� 9� 9�;K�[�Zd�ft�{�|E�|E��
F��)�)�,�{��"�#3�k�#A�"B�C.�.>�-?�@��)�K�7�;K�K�c�Q�ST�U�V�VX�Z�
�HS�,�)��M.��+7�*�+D�(���(�*<�k�7�S�*�%��!�7�7�9��!���%)�
�$�*�2�4�8�8�<�<�!��T�)��*��6!�	*��K�#�0�0�2�Z�?���(�)�	*��

�O�s��&R%�*R%�1R%�R%�S �-R%�R%�R%�<P�P�-P�P�R%�P�$R%�,AR%�
R%�AR%�S �	R"�R"�	P+�$R%�(S �+R"�#R"�+R%�.R"�7R"�8R�R%�S �R�R"�"R%�%	S�/*S�S �S�S � 	S)c��[UO2]6cP![UO2o[OU2o[U2o[
U2oU]6�cQU*Q*L]oU]6�cQU*Q*L]oU]6�cQU*Q*L]oPoUO%c�UOO2o	U	OQ]2o
U	OQ]2oU	OQ]2oV�*U*o
U
]6�cPV�*U
*]d*oQ[OQ[U2QU
Q	UQ
UQ[O0o[!Q[O"Q
[OQ[O$[U2Q[U2Q[OQ[O&Q[U2Q[OQ[O(Q[U2Q[OQ[O*QUO,[OU0PP	Q5P![cCKh9h)z$Print real-time sampling statistics.r\r[�frame_cache_hits�frame_cache_partial_hits�frame_cache_misses� zCache: z% (�+�/�)z
zStats:zHz (uµs)zMin: �HzzMax: zN=)�end�flush)r$r<�list�
statistics�mean�min�maxr6r
�	get_stats�getr�MAGENTAr�RESETr&r}�	BOLD_BLUE�YELLOW�GREEN�RED�CYANr=)r?�	hz_values�mean_hz�min_hz�max_hz�mean_us_per_sample�min_us_per_sample�max_us_per_sample�cache_stats_strrE�hits�partial�misses�total�hit_pcts&              rr{�$SampleProfiler._print_realtime_statssY���t�$�$�%��)����.�.�/�	��/�/�)�,���Y����Y���=D�a�K�c�G�m�y�8�Q��*0�1�*�S�6�\�Y�&�!�	�+1�1�*�S�6�\�Y�&�!�	�
������

��
�
�/�/�1���y�y�!3�Q�7���)�)�$>��B�����#7��;�����/���1�9�#�~��6��<�G�()�*�*<�*<�)=�W�S��\�N�RU�VZ�U[�[\�]d�\e�ef�gm�fn�no�pz�qA�qA�pB�'C�O�
	��z�+�+�,�F�:�3C�3C�2D�A�� � �!�#�g�,��t�C�8J�4K�3L�D�Q[�Qa�Qa�Pb�bc���� ��c�&�k�]�"�Z�5E�5E�4F�a��~�~��e�C��K�=��:�3C�3C�2D�A�����r�$�"4�"4�!5�j�6F�6F�5G���
!���		
��	 �
��
�s �?A%I+�%AI+�+	I:�5I:�9I:c�2
�UOO2o[Q[O
Q2[O02[[O
Q[O02UOQ]2oUOQ]2oUOQ]2oUOQ]2oV4*U*oU]6�cV6*]d*L]oU]6�cVF*]d*L]oU]6�cVV*]d*L]o	[Q[OQ[O02[Q	UQ

02[QUQ

Q[O[U2Q
[OQ02[QUQ

Q[O[U2Q
[OQ02[QUQ

Q[O[U	2Q
[OQ02UOQ]2o
UOQ]2oV�*oU]6�cV�*]d*L]o
U]6�cV�*]d*L]o[Q[OQ[O02[QU
Q

Q[O[U
2Q
[OQ02[QUQ

Q[O[U2Q
[OQ02UOQ]2oUOQ]2oUU*oU]6�cUU*]d*L]oU]6�cUU*]d*L]o[Q[OQ[O02[QUQ

Q[O[U2Q
[OQ02[QUQ

Q[O[U2Q
[OQ02UOQ]2oUOQ]2oUOQ]2oUOQ]2oUOQ]2oU]6�Cc%UOQQ 2oQ!U*
oUOQ"Q 2o[Q[OQ#[O02[Q$UQ

02[Q%UQ

Q[O[U2Q
[OQ02[QUQ

Q[O[U2Q
[OQ02[Q&UQ

Q'UQ

Q[O[U2Q
[OQ0
2UOQ(]2oUOQ)]2oUQ36�c[UQ3*2Q+0oL"UQ*6�c[UQ**2Q,0oLUQ-0o[Q[OQ.[O02[Q/UQ

QUQ02UOQ0]2oU]6�c2[Q[OQ1U[O02P!P![cP!h9h)4z6Print unwinder statistics including cache performance.�
zUnwinder Statistics:r=r�r�r��  zFrame Cache:z    Total samples:    riz    Full hits:        rk�%r�z    Partial hits:     z    Misses:           �frames_read_from_cache�frames_read_from_memoryzFrame Reads:z    From cache:       z    From memory:      �code_object_cache_hits�code_object_cache_misseszCode Object Cache:z    Hits:             �batched_read_attempts�batched_read_successes�batched_read_misses�batched_read_segments_requested�batched_read_segments_completed�batched_read_success_rateggY@�$batched_read_segment_completion_ratezBatched Reads:z    Attempts:         z    Successes:        z    Segments read:    r��memory_reads�memory_bytes_read�� MB� KB� BzMemory:z    Read operations:  �stale_cache_invalidationszStale cache invalidations: z2==================================================�)
r
r�r&r}rr�r�r�r�r�rr�r�) r?rEr=r�r�r��
total_lookups�hits_pct�partial_pct�
misses_pct�frames_from_cache�frames_from_memory�total_frames�cache_frame_pct�memory_frame_pct�	code_hits�code_misses�
total_code�
code_hits_pct�code_misses_pct�batched_attempts�batched_successes�batched_misses�segments_requested�segments_completed�batched_success_rate�batched_miss_rate�segment_completion_rater��memory_bytes�
memory_str�stale_invalidationss &                               rr�$SampleProfiler._print_unwinder_stats1s���	��M�M�+�+�-�E�	��:�'�'�(����1A�1A�0B�C�D�
��%�%�&�&:�:�;K�;K�:L�M�N��	�	�/�1�5�
� �9�9�%7��;��#(�9�9�-G��#K� �"�Y�Y�';�Q�?��(�C�FX�X�
�@M�q�?P�$�4�s�:�VW��JW�Z[�J[�/�?�#�E�ab��CP�ST�CT�(�8�3�>�Z[�
�
��:�?�?�#�<�
�0@�0@�/A�B�C�
�&�}�Q�&7�8�9�
�&�'7��&:�"�Z�=M�=M�<N�s�S[�}�o�]^�_i�_o�_o�^p�pq�r�s�
�&�'?��&B�"�Z�EV�EV�DW�X[�\g�Xh�Wi�ij�ku�k{�k{�j|�|}�~��
�&�'9�!�&<�B�z�~�~�>N�s�S]��N_�_`�ak�aq�aq�`r�rs�t�u�"�I�I�&>��B��"�Y�Y�'@�!�D��(�=��FR�UV�FV�,�;�c�A�\]��HT�WX�HX�.�=��C�^_��
��:�?�?�#�<�
�0@�0@�/A�B�C�
�&�'8��&;�2�j�>N�>N�=O�PS�Tc�Pd�Oe�ef�gq�gw�gw�fx�xy�z�{�
�&�'9�!�&<�B�z�~�~�>N�s�Sc�Od�Ne�ef�gq�gw�gw�fx�xy�z�{��I�I�6��:�	��i�i� :�A�>����,�
�:D�q�.��Z�/�#�5�a�
�>H�1�n�;��3�c�9�RS��
��:�?�?�#�#5�j�6F�6F�5G�H�I�
�&�y��m�2�j�6F�6F�5G��M�HZ�G[�[\�]g�]m�]m�\n�no�p�q�
�&�{�1�o�R�
���7G��O�H\�G]�]^�_i�_o�_o�^p�pq�r�s� �9�9�%<�a�@��!�I�I�&>��B�����#8�!�<��"�Y�Y�'H�!�L��"�Y�Y�'H�!�L���a��#(�9�9�-H�#�#N� � %�(<� <��&+�i�i�6��'�#�
�B�z���'�~�j�6F�6F�5G�H�I��*�+;�A�*>�?�@��(�):�1�(=�>��$�$�%�c�*>�&?�%@��*�BR�BR�AS�ST�V�
�
�(���(:�;��N�N�#�C�(9�$:�#;�1�Z�=M�=M�<N�a�Q�
�
�(�);�A�(>�a�@R�ST�?U�V��$�$�%�c�*A�&B�%C�1�Z�EU�EU�DV�VW�Y�
��y�y���3���y�y�!4�a�8���;�&���� <�=�>�c�B�J�
�T�
!���t� 3�4�5�S�9�J�(�>��,�J�
��:�?�?�#�7�:�+;�+;�*<�=�>�
�&�|�A�&6�b���A�F�G�$�i�i�(C�Q�G����"��B�z�(�(�)�)D�EX�DY�Zd�Zj�Zj�Yk�l�m�#��o�	��	�s�Z�	Z�Z�Zc��UO2o[Q[O
Q[O02UOQ]2oUOQ]2oUOQ]2oUOQ]2oUOQ]2oUOQ]2oU]6�c>V8*]d*o	VX*]d*o
Vh*]d*oVx*]d*oL]9o	9o
9q�[Q	UQ

02[QUQ

Q[OU	Q

Q[OQUQ

Q0
2[QUQ

QU
Q

Q02[QUQ

QUQ

Q02[QUQ

QUQ

Q02UOQ]2o
UOQ]2oUOQ]2o[Q[O
Q[O02[QU
Q

02[QUQ

Q[OUQ

Q[OQ02UOQ]2oUQ"6�cUQ"*Q

Q0oLUQ6�cUQ*Q

Q0oLUQ 0o[Q!U02P![[1cP!h9h)#z%Print binary I/O encoding statistics.r�zBinary Encoding:�repeat_records�repeat_samples�full_records�suffix_records�pop_push_records�
total_recordsz    Records:          �,z      RLE repeat:     rkz.1fr�z) [z	 samples]z      Full stack:     rlz      Suffix match:   z      Pop-push:       �total_frames_written�frames_saved�frame_compression_pctzFrame Efficiency:z    Frames written:   z    Frames saved:     r��
bytes_writtenr�r�r�r�z    Bytes (pre-zstd): r�)	r��
ValueErrorr&r}rr�r�r�r�)r?rbrEr�r�r�r�r�r��
repeat_pct�full_pct�
suffix_pct�pop_push_pct�frames_writtenr��compression_pctr��	bytes_strs&&                rr��"SampleProfiler._print_binary_stats�s���	��'�'�)�E�	��:�?�?�#�#3�J�4D�4D�3E�F�G����#3�Q�7�����#3�Q�7���y�y���3�����#3�Q�7�� �9�9�%7��;���	�	�/�1�5�
��1��'�7�#�=�J�#�3�c�9�H�'�7�#�=�J�+�;�c�A�L�@A�A�J�A��A�J�
�&�}�Q�&7�8�9�
�&�~�a�&8��:�;K�;K�:L�Z�X[�L\�\]�^h�^n�^n�]o�or�tB�CD�sE�EN�O�	P�
�&�|�A�&6�b��#��b�I�J�
�&�~�a�&8��:�c�:J�"�M�N�
�&�'7��&:�"�\�#�<N�b�Q�R����#9�1�=���y�y���3���)�)�$;�Q�?��
��:�?�?�#�#4�Z�5E�5E�4F�G�H�
�&�~�a�&8�9�:�
�&�|�A�&6�b��9I�9I�8J�?�[^�J_�_`�ak�aq�aq�`r�rs�t�u��	�	�/�1�5�
��K�'�(�K�8��=�S�A�I�
�d�
"�(�4�/��4�C�8�I�(�/��,�I�
�&�y�k�2�3��S�L�)�	��	�s�I3�3J�J�J)
r:rr6r1r)r>r9r<r=r
)N)�__name__�
__module__�__qualname__�__firstlineno__rr@r;rTrXr�r{rr��__static_attributes__�__classdictcell__)�
__classdict__s@rr0r0Rs�����$�GZ�$�ch�$�mq�$�|A�$�]a�$�qv�$�AF�$� 
�&3�>��>�~�%�~�@-
�^\n�|-4�-4rKr0c�j�U]6:cP
![OQ6Xc[OU]2P	![
OQ6Xc[OU2P	![Q[
O02g[cP
![cP	!h9h[cP
!h9h)r�posix�win32zUnsupported platform: )rr�killru�PermissionErrorr�platformr!rHryr�)r)s&rrzrz�s���
�a�x��	�w�w�'��	��G�G�C��O��

����	 �	��,�,�S�1���1�#�,�,��@�A�A��"�	���	��	���	��	�s;�B�B#�	B �B �B �B �B �#	B2�-B2�1B2r�r:r>r1rSr2r3r4rc	
��UOoU[6XcP
oLP	o[UUUUUUU	UUU
Q5
o
VMmU
O	VUQ5U!)aRSample a process using the provided collector.

Args:
    pid: Process ID to sample
    collector: Collector instance to use for gathering samples
    duration_sec: How long to sample for (seconds), or None to run until
        the process exits or interrupted
    all_threads: Whether to sample all threads
    realtime_stats: Whether to print real-time sampling statistics
    mode: Profiling mode - WALL (all samples), CPU (only when on CPU),
          GIL (only when holding GIL), ALL (includes GIL and CPU status),
          EXCEPTION (only when thread has an active exception)
    native: Whether to include native frames
    gc: Whether to include GC frames
    opcodes: Whether to include opcode information
    blocking: Whether to stop all threads before sampling for consistent snapshots

Returns:
    The collector with collected samples
�r:r1r2r3r4r5r6rrW)r9rr0r>r�)r)rbr�r:r>r1rSr2r3r4rr9r5�profilers&&$$$$$$$$$   rr�r��sr��F%�9�9���!�!�$)�!�%)�!�����
��
��";�$���H�-��
�O�O�I��O�E��rKc�p�U[6XcP
oLP	o[U]UUUUUUUQ5	o	U	OUQ5!)z.Return a single stack snapshot from a process.)r9r:r1r2r3r4r5rrW)rr0rX)
r)r:r1rSr2r3r4rr5rs
&$$$$$$$  rrXrXsT���!�!�$)�!�$(�!�����
��
��";��
�H����;��7�7rKc	
�8````�]PHo[U2%f"[QUQ0[OQ5R!RO
oU[6XcP
o
LP	o
[UUUUUUU	U
UU
Q5
nURmUUUU1QkoUOU2RO[6cfRO]6Xc"[QUQ0[OQ5R![QROQ[QUQ	0[OQ5R![cK�h9h)
aSample a process in live/interactive mode with curses TUI.

Args:
    pid: Process ID to sample
    collector: LiveStatsCollector instance
    duration_sec: How long to sample for (seconds)
    all_threads: Whether to sample all threads
    realtime_stats: Whether to print real-time sampling statistics
    mode: Profiling mode - WALL (all samples), CPU (only when on CPU),
          GIL (only when holding GIL), ALL (includes GIL and CPU status),
          EXCEPTION (only when thread has an active exception)
    native: Whether to include native frames
    gc: Whether to include GC frames
    opcodes: Whether to include opcode information
    blocking: Whether to stop all threads before sampling for consistent snapshots

Returns:
    The collector with collected samples
zNo samples collected - process z% exited before profiling could begin.)�filerc��:�ROU2RORRRQ5RO[6c4UO	2UO2RO
2P!RO2RO%c)RO2[OQ2J:RO
2P!RO
2h9h)rWg�������?)�init_cursesr��successful_samples�MIN_SAMPLES_FOR_TUI�clear�refresh�cleanup_curses�
mark_finishedrN�
_handle_inputrmrr)�stdscrrSrbr�rs&����r�curses_wrapper_func�(sample_live.<locals>.curses_wrapper_functs�������f�%�	'��O�O�I�|��O�M��+�+�.A�A�������� ��
�$�$�&�

�#�#�%��#�#�#��'�'�)��
�
�4� �$�
�$�$�&��I�$�$�&�s�(C� C�1!C�(C�C zOnly z sample(s) collected (minimum z required for TUI) - process z exited too quickly.)
�cursesrzr}r�stderrr9rr0r>�wrapperr|rr)r)rbr�r:r>r1rSr2r3r4rr%r9r5r#rs&fd$$$d$$$$    @r�sample_liver(5s`���B��s�#�#�
�/��u�4Y�Z�ad�ak�ak�l���%�9�9���!�!�$)�!�$(�!�����
��
��";�$���H�-�H��'�'�&
����*�+�
�#�#�&9�9��'�'�1�,��3�C�5�8]�^�eh�eo�eo�p���
�E�)�6�6�7�7U�Vi�Uj�kH�IL�HM�Ma�b�il�is�is�
t�����
��
�s�>D�	D�D�D)-r!�
contextlibrr�r�	sysconfigrm�collectionsr�	_colorizer�pstats_collectorr�stack_collectorrr�heatmap_collectorr�gecko_collectorr�binary_collectorr	�contextmanagerr�	constantsrrrrr�
_format_utilsr�live_collectorr�ImportError�get_config_varrFrrtr.r0rzr�rXr(�rKr�<module>r9s�����	��
����%�-�I�/�+�-����	��	�����2�!�/�/�0A�B�$�N�������8j4�j4�ZB�,>��	>�
�>��
>�
�>��>��>��>�
�>��>�B8��8�
�	8�
�8��
8��8�
�8��8�>^��	^�
�^��
^�
�^��^��^��^�
�^��^��Y�����s�1C"�"C.�(C.�-C.

Youez - 2016 - github.com/yon3zu
LinuXploit