Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
psutil
/
tests
/
__pycache__
[ HOME ]
Exec
Submit
File Name : test_memleaks.cpython-312.pyc
� x�/i�: � �b � d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z dd l mZ dd l mZ ddl m Z ddl mZ dd l mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl mZ ddl m Z ejB jD Z" ejF � Z$dZ%d � Z& G d!� d"e� Z' G d#� d$e'� Z(ejR jU e d%�&� G d'� d(e� � Z+ G d)� d*e� Z,y)+a� Tests for detecting function memory leaks (typically the ones implemented in C). It does so by calling a function many times and checking whether process memory usage keeps increasing between calls or over time. Note that this may produce false positives (especially on Windows for some reason). PyPy appears to be completely unstable for this framework, probably because of how its JIT handles memory, so tests are skipped. � N)�LINUX)�MACOS)�OPENBSD)�POSIX)�SUNOS)�WINDOWS)�AARCH64)�HAS_CPU_AFFINITY)�HAS_CPU_FREQ)�HAS_ENVIRON)� HAS_IONICE)�HAS_MEMORY_MAPS)�HAS_NET_IO_COUNTERS)�HAS_PROC_CPU_NUM)�HAS_PROC_IO_COUNTERS)� HAS_RLIMIT)�HAS_SENSORS_BATTERY)�HAS_SENSORS_FANS)�HAS_SENSORS_TEMPERATURES)�TestMemoryLeak)�create_sockets)� get_testfn)�process_namespace)�pytest)�skip_on_access_denied)� spawn_subproc)�system_namespace)� terminate� c � � d� } | S )zsDecorator for those Linux functions which are implemented in pure Python, and which we want to run faster. c �B � � t j � � � fd�� }|S )Nc �� �� t rI| j j } t | j _ �| g|��i |��|| j _ S �| g|��i |��S # || j _ w xY w�N)r � __class__�times� FEW_TIMES)�self�args�kwargs�before�funs ��K/opt/hc_python/lib64/python3.12/site-packages/psutil/tests/test_memleaks.py�wrapperz5fewtimes_if_linux.<locals>.decorator.<locals>.wrapper= si �� �����-�-��2�+4�D�N�N�(��t�5�d�5�f�5�+1�D�N�N�(��4�1�$�1�&�1�1�� ,2�D�N�N�(�s � A �A0)� functools�wraps)r+ r- s ` r, � decoratorz$fewtimes_if_linux.<locals>.decorator<