
     fo                        d dl mZ ddlmZmZ d dlmZ d dlZd dlZe G d d                      Z	dd
Z
	 dddZddZddZ ed          e G d d                                  ZdS )    )annotations   )event_classT_JSON_DICT)	dataclassNc                  D    e Zd ZU dZded<   ded<   d Zed             ZdS )	Metricz$
    Run-time execution metric.
    strnamefloatvaluec                J    t                      }| j        |d<   | j        |d<   |S )Nr   r   )dictr   r   )selfjsons     v/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/devtools/v127/performance.pyto_jsonzMetric.to_json   s&    vvyV
W    c                h     | t          |d                   t          |d                             S )Nr   r   )r   r   )r
   r   clsr   s     r   	from_jsonzMetric.from_json   s9    sT&\""W&&
 
 
 	
r   N)__name__
__module____qualname____doc____annotations__r   classmethodr    r   r   r	   r	      s`           III LLL   
 
 [
 
 
r   r	   return0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]c               #     K   ddi} | V }dS )z3
    Disable collecting and reporting metrics.
    methodzPerformance.disableNr   cmd_dictr   s     r   disabler&   &   s$      
 	'H >>DDDr   time_domaintyping.Optional[str]c              #  F   K   t                      }| | |d<   d|d}|V }dS )z
    Enable collecting and reporting metrics.

    :param time_domain: *(Optional)* Time domain to use for collecting and reporting duration metrics.
    N
timeDomainzPerformance.enabler#   paramsr   r'   r,   r%   r   s       r   enabler/   0   sB       &&F*|& H >>DDDr   r
   c              #  B   K   t                      }| |d<   d|d}|V }dS )a  
    Sets time domain to use for collecting and reporting duration metrics.
    Note that this must be called before enabling metrics collection. Calling
    this method while metrics collection is enabled returns an error.

    **EXPERIMENTAL**

    :param time_domain: Time domain
    r*   zPerformance.setTimeDomainr+   Nr-   r.   s       r   set_time_domainr1   B   s<       &&F&F<- H >>DDDr   ?typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[Metric]]c               #  :   K   ddi} | V }d |d         D             S )zj
    Retrieve current values of run-time metrics.

    :returns: Current values for run-time metrics.
    r#   zPerformance.getMetricsc                B    g | ]}t                               |          S r   r	   r   .0is     r   
<listcomp>zget_metrics.<locals>.<listcomp>a   s&    999AFQ999r   metricsr   r$   s     r   get_metricsr;   W   s8       	*H >>D99i9999r   zPerformance.metricsc                  @    e Zd ZU dZded<   ded<   edd	            Zd
S )Metricsz(
    Current values of the metrics.
    ztyping.List[Metric]r:   r
   titler   r   r    c                b     | d |d         D             t          |d                             S )Nc                B    g | ]}t                               |          S r   r5   r6   s     r   r9   z%Metrics.from_json.<locals>.<listcomp>r   s&    BBBQV%%a((BBBr   r:   r>   )r:   r>   )r
   r   s     r   r   zMetrics.from_jsono   s?    sBB$y/BBBd7m$$
 
 
 	
r   N)r   r   r    r=   )r   r   r   r   r   r   r   r   r   r   r=   r=   d   sU           !   JJJ
 
 
 [
 
 
r   r=   )r    r!   )N)r'   r(   r    r!   )r'   r
   r    r!   )r    r2   )
__future__r   utilr   r   dataclassesr   enumtypingr	   r&   r/   r1   r;   r=   r   r   r   <module>rF      s5   # " " " " " * * * * * * * * ! ! ! ! ! !  

 
 
 
 
 
 
 
0    -1    $   *
: 
: 
: 
: "##

 
 
 
 
 
 
  $#
 
 
r   