Ë
    1²jJ  ã            	       óÀ   — d dl mZ d dlmZ d dlZddlmZ ddee   defd„Zddee   defd	„Z	ddee   d
ee   fd„Z
ddee   ded
efd„Z	 	 	 ddee   deded
dfd„Zy)é    )ÚOptional)ÚprotonNé   )ÚflagsÚsessionÚphasec                 óš   — | €yt         j                  r| dk7  rt        d«      ‚t        j                  t        j                  | |«      «      S )zë
    Retrieves profiling data for a given session.

    Args:
        session (Optional[int]): The session ID of the profiling session, or None if profiling is inactive.
    Returns:
        str: The profiling data in JSON format.
    Nr   úEOnly one session can be retrieved when running from the command line.)r   Úcommand_lineÚ
ValueErrorÚjsonÚloadsÚ	libprotonÚget_data©r   r   s     úS/var/www/html/ia-enhanced/venv/lib/python3.12/site-packages/triton/profiler/data.pyÚgetr      sC   € ð €ØÜ×Ò˜g¨šlÜÐ`ÓaÐaÜ�:‰:”i×(Ñ(¨°%Ó8Ó9Ð9ó    c                 ót   — | €yt         j                  r| dk7  rt        d«      ‚t        j                  | |«      S )a  
    Retrieves profiling data for a given session encoded with MessagePack.

    Args:
        session (Optional[int]): The session ID of the profiling session, or None if profiling is inactive.

    Returns:
        bytes: The profiling data encoded with MessagePack.
    Nr   r
   )r   r   r   r   Úget_data_msgpackr   s     r   Úget_msgpackr      s:   € ð €ØÜ×Ò˜g¨šlÜÐ`ÓaÐaÜ×%Ñ% g¨uÓ5Ð5r   Úreturnc                 ór   — | €yt         j                  r| dk7  rt        d«      ‚t        j                  | «      S )zþ
    Advances the profiling phase for a given session.

    Args:
        session (Optional[int]): The session ID of the profiling session, or None if profiling is inactive.

    Returns:
        Optional[int]: The next phase number after advancing.
    Nr   zFOnly one session can advance phase when running from the command line.)r   r   r   r   Úadvance_data_phase)r   s    r   Úadvance_phaser   (   s8   € ð €ØÜ×Ò˜g¨šlÜÐaÓbÐbÜ×'Ñ'¨Ó0Ð0r   c                 ót   — | €yt         j                  r| dk7  rt        d«      ‚t        j                  | |«      S )a  
    Checks if the profiling data for a given session and phase is complete.

    A "complete" phase is safe to read/clear because all device-side records for
    the phase have been flushed to the host and the phase will no longer receive
    new records.

    Args:
        session (Optional[int]): The session ID of the profiling session, or None if profiling is inactive.
        phase (int): The phase number to check. Defaults to 0.

    Returns:
        bool: True if the phase data is complete, False otherwise.
    Fr   zVOnly one session can check phase completion status when running from the command line.)r   r   r   r   Úis_data_phase_completer   s     r   Úis_phase_completer   9   s:   € ð €ØÜ×Ò˜g¨šlÜÐqÓrÐrÜ×+Ñ+¨G°UÓ;Ð;r   Úclear_up_to_phasec                 óx   — | €yt         j                  r| dk7  rt        d«      ‚t        j                  | ||«       y)aC  
    Clears profiling data for a given session.

    Args:
        session (Optional[int]): The session ID of the profiling session, or None if profiling is inactive.
        phase (int): The phase number to clear. Defaults to 0.
        clear_up_to_phase (bool): If True, clear all phases up to and including `phase`.
    Nr   zCOnly one session can be cleared when running from the command line.)r   r   r   r   Ú
clear_data)r   r   r   s      r   Úclearr"   O   s:   € ð €ØÜ×Ò˜g¨šlÜÐ^Ó_Ð_Ü×Ñ˜ %Ð):Õ;r   )r   r   )r   )r   r   F)Útypingr   Útriton._C.libprotonr   r   r   r   Úintr   r   r   Úboolr   r"   © r   r   ú<module>r(      s°   ðÝ Ý 3Û Ý ñ:�˜#‘ð :¨3ó :ñ 6˜ #™ð 6°3ó 6ñ"1˜8 C™=ð 1°¸#±ó 1ñ"<˜x¨™}ð <¸ð <ÀTó <ð. ØØ#ñ<Ø�c‰]ð<àð<ð ð<ð 
ô	<r   