o
    pi8                     @   s*  U d dl mZmZmZmZmZmZmZ d dlm	Z	m
Z
mZmZmZmZ eee	gee f eee e	df f ZdZeed< 	 dede
fdd	Zd
Zeed< 	 dede
fddZdZeed< 	 dedeee  defddZdZeed< 	 dede
fddZdZeed< 	 dedefddZdZeed< 	 dedefddZdZeed < 	 dede
fd!d"Zd#Zeed$< 	 dedefd%d&Z d'Z!eed(< 	 dede
fd)d*Z"d+Z#eed,< 	 dedefd-d.Z$d/Z%eed0< 	 dedefd1d2Z&d3Z'eed4< 	 dedeee  defd5d6Z(d7Z)eed8< 	 dedefd9d:Z*dS );    )CallableFinal	GeneratorIterableOptionalSequenceUnion)CallbackOptionsCounterMeterObservableGaugeObservationUpDownCounterNzprocess.context_switchesPROCESS_CONTEXT_SWITCHESmeterreturnc                 C      | j tdddS )z5Number of times the process has been context switchedz6Number of times the process has been context switched.z{context_switch}namedescriptionunit)create_counterr   r    r   m/home/ubuntu/.local/lib/python3.10/site-packages/opentelemetry/semconv/_incubating/metrics/process_metrics.pycreate_process_context_switches1   
   r   zprocess.cpu.timePROCESS_CPU_TIMEc                 C   r   )z1Total CPU seconds broken down by different statesz2Total CPU seconds broken down by different states.sr   )r   r   r   r   r   r   create_process_cpu_timeB   r   r   zprocess.cpu.utilizationPROCESS_CPU_UTILIZATION	callbacksc                 C      | j t|dddS )zDifference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the processzDifference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process.1r   r!   r   r   )create_observable_gauger    r   r!   r   r   r   create_process_cpu_utilizationS      r'   zprocess.disk.ioPROCESS_DISK_IOc                 C   r   )zDisk bytes transferredzDisk bytes transferred.Byr   )r   r)   r   r   r   r   create_process_disk_iog   r   r+   zprocess.memory.usagePROCESS_MEMORY_USAGEc                 C   r   )z$The amount of physical memory in usez%The amount of physical memory in use.r*   r   )create_up_down_counterr,   r   r   r   r   create_process_memory_usagex   r   r.   zprocess.memory.virtualPROCESS_MEMORY_VIRTUALc                 C   r   )z&The amount of committed virtual memoryz'The amount of committed virtual memory.r*   r   )r-   r/   r   r   r   r   create_process_memory_virtual   r   r0   zprocess.network.ioPROCESS_NETWORK_IOc                 C   r   )zNetwork bytes transferredzNetwork bytes transferred.r*   r   )r   r1   r   r   r   r   create_process_network_io   r   r2   z"process.open_file_descriptor.count"PROCESS_OPEN_FILE_DESCRIPTOR_COUNTc                 C   r   )z<Deprecated, use `process.unix.file_descriptor.count` insteadz=Deprecated, use `process.unix.file_descriptor.count` instead.{file_descriptor}r   )r-   r3   r   r   r   r   )create_process_open_file_descriptor_count   r   r5   zprocess.paging.faultsPROCESS_PAGING_FAULTSc                 C   r   )z*Number of page faults the process has madez+Number of page faults the process has made.z{fault}r   )r   r6   r   r   r   r   create_process_paging_faults   r   r7   zprocess.thread.countPROCESS_THREAD_COUNTc                 C   r   )zProcess threads countzProcess threads count.z{thread}r   )r-   r8   r   r   r   r   create_process_thread_count   r   r9   z"process.unix.file_descriptor.count"PROCESS_UNIX_FILE_DESCRIPTOR_COUNTc                 C   r   )z5Number of unix file descriptors in use by the processz6Number of unix file descriptors in use by the process.r4   r   )r-   r:   r   r   r   r   )create_process_unix_file_descriptor_count   r   r;   zprocess.uptimePROCESS_UPTIMEc                 C   r"   )z%The time the process has been runningz&The time the process has been running.r   r$   )r%   r<   r&   r   r   r   create_process_uptime   r(   r=   zprocess.windows.handle.countPROCESS_WINDOWS_HANDLE_COUNTc                 C   r   )z%Number of handles held by the processz&Number of handles held by the process.z{handle}r   )r-   r>   r   r   r   r   #create_process_windows_handle_count  r   r?   )+typingr   r   r   r   r   r   r   opentelemetry.metricsr	   r
   r   r   r   r   	CallbackTr   __annotations__r   r   r   r    r'   r)   r+   r,   r.   r/   r0   r1   r2   r3   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r   r   r   r   <module>   sx   & 

		

			

		

		

