403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/profiling.cpython-39.opt-1.pyc
a

�+�b�"�@s�ddlmZmZddlZddlmZddlmZmZddl	m
Z
mZmZmZm
Z
dd�Zejd	d
��Zejdd��Zejd
d��ZGdd�de�ZdS)�)�absolute_import�print_functionN�)�_)�getattr�open)�encoding�error�
extensions�pycompat�utilcCsH|}tj||gd�zt�|�}Wnty6YdS0t|dd�SdS)zBload profiler extension. return profile method, or None on failure)Z	whitelistN�profile)r
Zloadall�find�KeyErrorr)�ui�profilerZextname�mod�r�9/usr/lib64/python3.9/site-packages/mercurial/profiling.py�
_loadprofilersrccsh|�dd�}|�dd�}|�dd�}|�dd�}|dvrN|�td�|�d}zd	d
lm}Wn ty~t�td���Yn0|�	�}|j
dd
�zjdVW|��|dkr�d	dlm}|�
|�}	|	�|�n.|�|���}
|
�t�|��|
j|||d�nd|��|dk�r4d	dlm}|�
|�}	|	�|�n.|�|���}
|
�t�|��|
j|||d�0dS)N�	profilingsformatssortslimitsnested)�text�kcachegrinds-unrecognized profiling format '%s' - Ignored
rr)�lsprofsYlsprof not available - install from http://codespeak.net/svn/user/arigo/hack/misc/lsprof/T)Zsubcallsr)�lsprofcalltree)�limit�file�climit)�config�	configint�warnr�r�ImportErrorr	�AbortZProfiler�enable�disablerZKCacheGrind�outputZStatsZgetstats�sortrZsysstrZpprint)r�fp�formatZfieldrrr�prZcalltreeZstatsrrr�	lsprofile&sF��

�

r+c
cs�zddlm}Wn ty0t�td���Yn0|�dd�}d}d}|�|d|||�}t��}zH|�	�dVW|�
�|��tdt��||�
�|j
dd	�f�n8|�
�|��tdt��||�
�|j
dd	�f�0dS)
Nr)�
flamegraphsWflamegraph not available - install from https://github.com/evanhempel/python-flamegraphr�freqTg�?s7Collected %d stack frames (%d unique) in %2.2f seconds.)�unique)r,r"r	r#rrZ
ProfileThreadrZtimer�start�stop�join�printZ
num_frames)rr(r,�freqZfilter_Zcollapse_recursion�threadZ
start_timerrr�flameprofileMsL��
�

����

���r5ccsrddlm}|�dd�}|dkr8|jjdkrJ|�|�n|�td�|�|�ddt	j
r\dp^d	�}|jd
|d��zdVW|��}|�dd�}|j
j|j
j|j
j|j
j|j
jd
�}||vr�||}n|�td�|�|j
j}i}	dd�}
|dk�r$|�|
ddd�}|�|
dd�}|	j||d�n6|dk�rZ|�|
ddd�}
|
|	d<|�dd�}||	d<|j|f||d�|	��n�|��}|�dd�}|j
j|j
j|j
j|j
j|j
jd
�}||v�r�||}n|�td�|�|j
j}i}	dd�}
|dk�r|�|
ddd�}|�|
dd�}|	j||d�n6|dk�rT|�|
ddd�}
|
|	d<|�dd�}||	d<|j|f||d�|	��0dS)Nr)�statprofrr-rs+invalid sampling frequency '%s' - ignoring
s
time-trackscpusrealsthread)Z	mechanism�tracks
statformat)sbylinesbymethod�hotpathsjson�chromes#unknown profiler output format: %s
cSsft|ttf�rt|�S|�d�r6t|dd��d}nt|�}d|krRdkrZnn|St|��dS)N�%����drr)�
isinstance�float�int�endswith�
ValueError)�s�vrrr�fraction�s
zstatprofile.<locals>.fractionr9sshowming{�G�zt?sshowmax)ZminthresholdZmaxthresholdr8g�������?rsshowtime�showtime)�datar))r!r6r�stateZ
profile_level�resetr rrr�	iswindowsr/r0ZDisplayFormatsZByLineZByMethodZHotpathZJsonZChromeZ
configwith�updateZ
configboolZdisplay)rr(r6r3r7rFZ
profformat�formatsZ
displayformat�kwargsrDZshowminZshowmaxrrErrr�statprofilepsx��


��



rMc@sBeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)r
z�Start profiling.

    Profiling is active when the context manager is active. When the context
    manager exits, profiling results will be written to the configured output.
    TcCs:||_d|_d|_d|_d|_d|_||_d|_d|_dS)NTF)	�_ui�_output�_fp�
_fpdoclose�_flushfp�	_profiler�_enabled�_entered�_started)�selfrZenabledrrr�__init__�szprofile.__init__cCsd|_|jr|��|S)NT)rUrTr/�rWrrr�	__enter__�szprofile.__enter__cCsn|jst�d��|jrdSd|_tj�d�}d}|durF|j�dd�}|dvrzt	|j|�}|durz|j�
td�|�d	}|j�dd
�|_z�|jdkr�t
��|_nd|jr�t
�|j�}t|d�|_nDtjr�Gd
d�dt�}d|_||j�|_nd|_|jj|_|jj|_|du�rn$|dk�r"t}n|dk�r2t}nt}||j|j�|_|j��Wn|���Yn0dS)z�Start profiling.

        The profiling will stop at the context exit.

        If the profiler was already started, this has no effect.suse a context manager to startNTsHGPROFrstype)�ls�stat�flames%unrecognized profiler '%s' - ignored
r\soutput�blackboxswbc@s$eZdZdd�Zdd�Zdd�ZdS)zprofile.start.<locals>.uifpcSs
||_dS�N)rN)rWrrrrrX�sz$profile.start.<locals>.uifp.__init__cSs|j�|�dSr_)rNZ	write_err)rWrFrrr�write�sz!profile.start.<locals>.uifp.writecSs|j��dSr_)rN�flushrYrrrra�sz!profile.start.<locals>.uifp.flushN)�__name__�
__module__�__qualname__rXr`rarrrr�uifp�sreFr[r])rUr	ZProgrammingErrorrVr�environ�getrNrrr rrOrZstringiorPZ
expandpathrrrI�objectrQZferrZfoutrRr+r5rMrSrZ�_closefp)rWrZproffn�pathrerrrr/�sT

�






z
profile.startcCsdd}|jdurX|��|j�|||�}|jdkrXd|j��}|�dd�}|j�d|�|�	�|S)Nr^sProfile:
%sr:s%%sprofile)
rS�_uiflush�__exit__rOrP�getvalue�replacerN�logri)rWZexception_typeZexception_value�	tracebackZ	propagate�valrrrrls
�
zprofile.__exit__cCs|jr|jdur|j��dSr_)rQrP�closerYrrrriszprofile._closefpcCs|jr|j��dSr_)rRrarYrrrrk szprofile._uiflushN)T)
rbrcrd�__doc__rXrZr/rlrirkrrrrr
�s
Cr
)Z
__future__rr�
contextlibZi18nrrrrr!rr	r
rr�contextmanagerr+r5rMrhr
rrrr�<module>s	
&
"
@

Youez - 2016 - github.com/yon3zu
LinuXploit