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
/
prometheus_client
/
__pycache__
[ HOME ]
Exec
Submit
gc_collector.cpython-312.pyc
� ���g� � �h � d dl Z d dlZd dlmZ ddlmZmZ ddlmZm Z m Z G d� de� Z e� Zy)� N)�Iterable� )�CounterMetricFamily�Metric)� Collector�CollectorRegistry�REGISTRYc �2 � e Zd ZdZefdefd�Zdee fd�Z y)�GCCollectorz,Collector for Garbage collection statistics.�registryc �v � t t d� rt j � dk7 ry |j | � y )N� get_stats�CPython)�hasattr�gc�platform�python_implementation�register)�selfr s �M/opt/hc_python/lib/python3.12/site-packages/prometheus_client/gc_collector.py�__init__zGCCollector.__init__ s- � ��r�;�'�8�+I�+I�+K�y�+X�����$�� �returnc �P � t dddg�� }t dddg�� }t dddg�� }t t j � � D ]U \ }}t |� }|j |g|d � � |j |g|d � � |j |g|d � � �W |||gS ) N�python_gc_objects_collectedzObjects collected during gc� generation)�labels�python_gc_objects_uncollectablez%Uncollectable objects found during GC�python_gc_collectionsz-Number of times this generation was collected� collected)�value� uncollectable�collections)r � enumerater r �str� add_metric)r r r"