403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.142
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__/binary_collector.cpython-315.pyc
R
>lqj�c�L�Qs]PHs]PHs]QHGs]s]sQsQQ\2sP!)z>Thin Python wrapper around C binary writer for profiling data.)�	Collectorc��[U[2%cU!UO2oUQ6Xc[!UQ6Xc[!UQ6Xc([
O2%c[![![QU02g)z�Resolve compression type from string or int.

Args:
    compression: 'auto', 'zstd', 'none', or int (0/1)

Returns:
    int: Compression type constant
�none�zstd�autozUnknown compression type: )�
isinstance�int�lower�COMPRESSION_NONE�COMPRESSION_ZSTD�_remote_debugging�zstd_available�
ValueError��compressions&�8C:\Python315\\Lib\profiling\sampling\binary_collector.py�_resolve_compressionrsw���+�s�#�#����#�#�%�K��f����	��	���	��	��+�+�-�-�#�#����5�k�]�C�D�D�c�t`�\sQs](snQsQP
QQ-QksQQksQsQQks\	Q	2s
Q
sQsQs
Q
sUsP!)�BinaryCollectora1High-performance binary collector using C implementation.

This collector writes profiling data directly to a binary file format
with optional zstd compression. All I/O is performed in C for maximum
throughput.

The binary format uses string/frame deduplication and varint encoding
for efficient storage.
�	skip_idlerrc���VmV mV0m[U2o[	[
O2Q*2o[OVVeQ5Um	P!)aCreate a new binary collector.

Args:
    filename: Path to output binary file
    sample_interval_usec: Sampling interval in microseconds
    skip_idle: If True, skip idle threads (not used in binary format)
    compression: 'auto', 'zstd', 'none', or int (0=none, 1=zstd)
�@Br)
�filename�sample_interval_usecrrr�time�	monotonicr�BinaryWriter�_writer)�selfrrrr�compression_type�
start_time_uss&&&$$  r�__init__�BinaryCollector.__init__3sL��!�
�$8�!�"��/��<���D�N�N�,�y�8�9�
�(�5�5��M�
��rc��Ue&[[O2Q*2oUOO	V2P!)aWCollect profiling data from stack frames.

This passes stack_frames directly to the C writer which handles
all encoding and buffering.

Args:
    stack_frames: List of InterpreterInfo objects from _remote_debugging
    timestamp_us: Optional timestamp in microseconds. If not provided,
                  uses time.monotonic() to generate one.
r)rrrr�write_sample)r�stack_frames�timestamp_uss&&&r�collect�BinaryCollector.collectGs2�����t�~�~�/�)�;�<�L����!�!�,�=rc��P!)z9Record a failed sample attempt (no-op for binary format).��rs&r�collect_failed_sample�%BinaryCollector.collect_failed_sampleVs��rc�<�UOO2P	!)zjFinalize and close the binary file.

Args:
    filename: Ignored (binary files are written incrementally)
)r�finalize)rrs&&r�export�BinaryCollector.exportZs��	
������rc�0�UOO!�N)r�
total_samplesr+s&rr4�BinaryCollector.total_samplescs���|�|�)�)�)rc�8�UOO2!)z�Get encoding statistics.

Returns:
    Dict with encoding statistics including repeat/full/suffix/pop-push
    record counts, frames written/saved, and compression ratio.
)r�	get_statsr+s&rr7�BinaryCollector.get_statsgs���|�|�%�%�'�'rc��U!r3r*r+s&r�	__enter__�BinaryCollector.__enter__ps���rc�|�UeUOO2P
!UOO2P
!)z:Context manager exit - finalize unless there was an error.)rr/�close)r�exc_type�exc_val�exc_tbs&&&&r�__exit__�BinaryCollector.__exit__ss2�����L�L�!�!�#��
�L�L��� �r)rrrrr3)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r!r'r,r0�propertyr4r7r:rA�__static_attributes__�__classdictcell__)�
__classdict__s@rrr(sU�����
�E�
�#�
�(
>�
���*��*�(���rr)	rGrr�	collectorrr	r
rrr*rr�<module>rMs3��D��� �����E�4Q�i�Qr

Youez - 2016 - github.com/yon3zu
LinuXploit