관리-도구
편집 파일: process_collector.cpython-38.pyc
U .?�f � @ s� d dl Z d dlmZmZmZmZ ddlmZmZm Z ddl mZmZm Z zd dlZe�� ZW n ek rt dZY nX G dd� de�Ze� ZdS ) � N)�Callable�Iterable�Optional�Union� )�CounterMetricFamily�GaugeMetricFamily�Metric)� Collector�CollectorRegistry�REGISTRYi c @ s` e Zd ZdZddd� defeeg eeef f ee e d�dd�Zd d � Ze e d�dd �ZdS )�ProcessCollectorz6Collector for Standard Exports such as cpu and memory.� c C s dS )N�self� r r r �Q/opt/hc_python/lib/python3.8/site-packages/prometheus_client/process_collector.py�<lambda> � zProcessCollector.<lambda>z/proc)� namespace�pid�proc�registryc C s� || _ || _|| _|r"|d | _nd| _d| _zt�d�| _W n ttt t fk rZ Y nX t| _d| _ z| �� | _ W n t k r� Y nX |r�|�| � d S )NZ _process_Zprocess_g Y@� SC_CLK_TCKr )Z _namespace�_pid�_proc�_prefix�_ticks�os�sysconf� ValueError� TypeError�AttributeError�OSError� _PAGESIZE� _pagesize�_btime� _boot_time�register)r r r r r r r r �__init__ s&