관리-도구
편집 파일: tracing.cpython-37.pyc
B �k�a�; � @ s� d dl mZ d dlmZmZmZmZmZ d dlZd dl m Z d dlmZ d dl mZ ddlmZ er�dd lmZ dd lmZ eddd �ZG dd� dee �ZdZG dd� d�Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G d d!� d!��Z ejdddd�G d"d#� d#��Z!ejdddd�G d$d%� d%��Z"ejdddd�G d&d'� d'��Z#ejdddd�G d(d)� d)��Z$ejdddd�G d*d+� d+��Z%ejdddd�G d,d-� d-��Z&ejdddd�G d.d/� d/��Z'ejdddd�G d0d1� d1��Z(ejdddd�G d2d3� d3��Z)G d4d5� d5�Z*dS )6� )�SimpleNamespace)� TYPE_CHECKING� Awaitable�Optional�Type�TypeVarN)�Signal)�CIMultiDict)�URL� )�ClientResponse)� ClientSession)�Protocol�_ParamT_contraT)� contravariantc @ s$ e Zd Zeeeed d�dd�ZdS )�_SignalCallbackN)�_SignalCallback__client_session�!_SignalCallback__trace_config_ctx�_SignalCallback__params�returnc C s d S )N� )�selfr r r r r �B/opt/alt/python37/lib64/python3.7/site-packages/aiohttp/tracing.py�__call__ s z_SignalCallback.__call__)�__name__� __module__�__qualname__r r r r r r r r r r s r )�TraceConfig�TraceRequestStartParams�TraceRequestEndParams�TraceRequestExceptionParams� TraceConnectionQueuedStartParams�TraceConnectionQueuedEndParams� TraceConnectionCreateStartParams�TraceConnectionCreateEndParams�TraceConnectionReuseconnParams�TraceDnsResolveHostStartParams�TraceDnsResolveHostEndParams�TraceDnsCacheHitParams�TraceDnsCacheMissParams�TraceRequestRedirectParams�TraceRequestChunkSentParams� TraceResponseChunkReceivedParams�TraceRequestHeadersSentParamsc @ sl e Zd ZdZefee dd�dd�Zd<ee ed�dd�Zdd �d d�Z e dd �d d��Ze dd �dd��Ze dd �dd��Z e dd �dd��Ze dd �dd��Ze dd �dd��Ze dd �dd ��Ze d!d �d"d#��Ze d$d �d%d&��Ze d'd �d(d)��Ze d*d �d+d,��Ze d-d �d.d/��Ze d0d �d1d2��Ze d3d �d4d5��Ze d6d �d7d8��Ze d9d �d:d;��ZdS )=r zFFirst-class used to trace requests launched via ClientSession objects.N)�trace_config_ctx_factoryr c C s� t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _ t | �| _ t | �| _t | �| _t | �| _ t | �| _t | �| _t | �| _|| _d S )N)r �_on_request_start�_on_request_chunk_sent�_on_response_chunk_received�_on_request_end�_on_request_exception�_on_request_redirect�_on_connection_queued_start�_on_connection_queued_end�_on_connection_create_start�_on_connection_create_end�_on_connection_reuseconn�_on_dns_resolvehost_start�_on_dns_resolvehost_end�_on_dns_cache_hit�_on_dns_cache_miss�_on_request_headers_sent�_trace_config_ctx_factory)r r. r r r �__init__3 sB zTraceConfig.__init__)�trace_request_ctxr c C s | j |d�S )z&Return a new trace_config_ctx instance)rA )r? )r rA r r r �trace_config_ctxi s zTraceConfig.trace_config_ctx)r c C s� | j �� | j�� | j�� | j�� | j�� | j�� | j�� | j�� | j �� | j �� | j�� | j�� | j �� | j�� | j�� | j�� d S )N)r/ �freezer0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r: r; r<