Graybyt3 Was Here
Linux cloud.locucionar.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Apache
91.191.211.241
/
opt
/
alt
/
python38
/
lib64
/
python3.8
/
site-packages
/
psutil
/
tests
/
__pycache__
[ HOME ]
Exec
Submit
test_memleaks.cpython-38.pyc
U �=�_�9 � @ s d Z ddlmZ ddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddlm Z ddlmZ dd lmZ dd l mZ ddl mZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ dd lm%Z% ej&j'Z'e�(� Z)d!Z*d"d#� Z+G d$d%� d%e$�Z,G d&d'� d'e,�Z-e%�.e d(�G d)d*� d*e$��Z/G d+d,� d,e$�Z0e1d-k�rdd.l2m3Z3 e3e4� dS )/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. � )�print_functionN)�LINUX)�MACOS)�OPENBSD)�POSIX)�SUNOS)�WINDOWS)�ProcessLookupError)�super)�create_sockets)� get_testfn)�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)�process_namespace)�skip_on_access_denied)�spawn_testproc)�system_namespace)� terminate)�TestMemoryLeak)�unittest� c C s dd� } | S )zsDecorator for those Linux functions which are implemented in pure Python, and which we want to run faster. c s t �� �� fdd��}|S )Nc sJ t r6| jj}zt| j_� | f|�|�W �S || j_X n� | f|�|�S d S �N)r � __class__�times� FEW_TIMES)�self�args�kwargsZbefore��fun� �M/opt/alt/python38/lib64/python3.8/site-packages/psutil/tests/test_memleaks.py�wrapperA s z5fewtimes_if_linux.<locals>.decorator.<locals>.wrapper)� functools�wraps)r) r, r* r( r+ � decorator@ s z$fewtimes_if_linux.<locals>.decoratorr* )r/ r* r* r+ �fewtimes_if_linux<