
     f                    8   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 G d dej	                  Z
e G d d	                      Ze G d
 d                      Ze G d d                      Zd#dZd$dZd$dZd%dZd&dZ	 	 d'd(dZd$dZd)d Zd)d!Zd)d"ZdS )*    )annotations   )event_classT_JSON_DICT)	dataclassNc                  6    e Zd ZdZdZdZd Zed             ZdS )PressureLevelz 
    Memory pressure level.
    moderatecriticalc                    | j         S N)value)selfs    p/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/devtools/v85/memory.pyto_jsonzPressureLevel.to_json   s
    z    c                     | |          S r    clsjsons     r   	from_jsonzPressureLevel.from_json   s    s4yyr   N)	__name__
__module____qualname____doc__MODERATECRITICALr   classmethodr   r   r   r   r	   r	      sT          HH     [  r   r	   c                  N    e Zd ZU dZded<   ded<   ded<   d Zed             Zd	S )
SamplingProfileNodez
    Heap profile sample.
    floatsizetotalztyping.List[str]stackc                r    t                      }| j        |d<   | j        |d<   d | j        D             |d<   |S )Nr#   r$   c                    g | ]}|S r   r   .0is     r   
<listcomp>z/SamplingProfileNode.to_json.<locals>.<listcomp>.   s    ///q///r   r%   )dictr#   r$   r%   r   r   s     r   r   zSamplingProfileNode.to_json*   s?    vvyV
W//DJ///Wr   c                     | t          |d                   t          |d                   d |d         D                       S )Nr#   r$   c                ,    g | ]}t          |          S r   )strr(   s     r   r+   z1SamplingProfileNode.from_json.<locals>.<listcomp>6   s    111a3q66111r   r%   )r#   r$   r%   )r"   r   s     r   r   zSamplingProfileNode.from_json1   sN    stF|$$W&&114=111
 
 
 	
r   Nr   r   r   r   __annotations__r   r   r   r   r   r   r!   r!      sn           KKK LLL    
 
 [
 
 
r   r!   c                  D    e Zd ZU dZded<   ded<   d Zed             ZdS )	SamplingProfilez(
    Array of heap profile samples.
    z typing.List[SamplingProfileNode]samplesztyping.List[Module]modulesc                r    t                      }d | j        D             |d<   d | j        D             |d<   |S )Nc                6    g | ]}|                                 S r   r   r(   s     r   r+   z+SamplingProfile.to_json.<locals>.<listcomp>E        ===1199;;===r   r5   c                6    g | ]}|                                 S r   r9   r(   s     r   r+   z+SamplingProfile.to_json.<locals>.<listcomp>F   r:   r   r6   )r,   r5   r6   r-   s     r   r   zSamplingProfile.to_jsonC   sB    vv=====Y=====Yr   c                \     | d |d         D             d |d         D                       S )Nc                B    g | ]}t                               |          S r   )r!   r   r(   s     r   r+   z-SamplingProfile.from_json.<locals>.<listcomp>L   s'    OOO!(22155OOOr   r5   c                B    g | ]}t                               |          S r   )Moduler   r(   s     r   r+   z-SamplingProfile.from_json.<locals>.<listcomp>M   s&    BBBQV%%a((BBBr   r6   )r5   r6   r   r   s     r   r   zSamplingProfile.from_jsonI   sE    sOOtIOOOBB$y/BBB
 
 
 	
r   Nr1   r   r   r   r4   r4   :   sd           .---       
 
 [
 
 
r   r4   c                  X    e Zd ZU dZded<   ded<   ded<   ded<   d Zed	             Zd
S )r?   z'
    Executable module information
    r0   nameuuidbase_addressr"   r#   c                r    t                      }| j        |d<   | j        |d<   | j        |d<   | j        |d<   |S )NrA   rB   baseAddressr#   )r,   rA   rB   rC   r#   r-   s     r   r   zModule.to_jsonc   s>    vvyVyV"/]yVr   c           	          | t          |d                   t          |d                   t          |d                   t          |d                             S )NrA   rB   rE   r#   )rA   rB   rC   r#   )r0   r"   r   s     r   r   zModule.from_jsonk   sX    sT&\""T&\""T-011tF|$$	
 
 
 	
r   Nr1   r   r   r   r?   r?   Q   sy           III III  KKK   
 
 [
 
 
r   r?   returnGtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[int, int, int]]c               #     K   ddi} | V }t          |d                   t          |d                   t          |d                   fS )z


    :returns: A tuple with the following items:

        0. **documents** - 
        1. **nodes** - 
        2. **jsEventListeners** - 
    methodzMemory.getDOMCounters	documentsnodesjsEventListeners)intcmd_dictr   s     r   get_dom_countersrQ   u   sZ       	)H >>DDDMD#$%% r   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]c               #     K   ddi} | V }d S )NrJ   zMemory.prepareForLeakDetectionr   rO   s     r   prepare_for_leak_detectionrT      s$       	2H >>DDDr   c               #     K   ddi} | V }dS )z8
    Simulate OomIntervention by purging V8 memory.
    rJ   z$Memory.forciblyPurgeJavaScriptMemoryNr   rO   s     r   !forcibly_purge_java_script_memoryrV      s$      
 	8H >>DDDr   
suppressedboolc              #  B   K   t                      }| |d<   d|d}|V }dS )z
    Enable/disable suppressing memory pressure notifications in all processes.

    :param suppressed: If true, memory pressure notifications will be suppressed.
    rW   z)Memory.setPressureNotificationsSuppressedrJ   paramsNr,   )rW   r[   rP   r   s       r   %set_pressure_notifications_suppressedr]      s<       &&F%F<= H >>DDDr   levelc              #  f   K   t                      }|                                 |d<   d|d}|V }dS )z
    Simulate a memory pressure notification in all processes.

    :param level: Memory pressure level of the notification.
    r^   z#Memory.simulatePressureNotificationrZ   N)r,   r   )r^   r[   rP   r   s       r   simulate_pressure_notificationr`      sC       &&FmmooF7O7 H >>DDDr   sampling_intervaltyping.Optional[int]suppress_randomnesstyping.Optional[bool]c              #  T   K   t                      }| | |d<   |||d<   d|d}|V }dS )z
    Start collecting native memory profile.

    :param sampling_interval: *(Optional)* Average number of bytes between samples.
    :param suppress_randomness: *(Optional)* Do not randomize intervals between samples.
    NsamplingIntervalsuppressRandomnesszMemory.startSamplingrZ   r\   )ra   rc   r[   rP   r   s        r   start_samplingrh      sT       &&F$%6!"&':#$( H >>DDDr   c               #     K   ddi} | V }dS )z0
    Stop collecting native memory profile.
    rJ   zMemory.stopSamplingNr   rO   s     r   stop_samplingrj      s$      
 	'H >>DDDr   ;typing.Generator[T_JSON_DICT, T_JSON_DICT, SamplingProfile]c               #  V   K   ddi} | V }t                               |d                   S )zr
    Retrieve native memory allocations profile
    collected since renderer process startup.

    :returns: 
    rJ   z Memory.getAllTimeSamplingProfileprofiler4   r   rO   s     r   get_all_time_sampling_profilero      8       	4H >>D$$T)_555r   c               #  V   K   ddi} | V }t                               |d                   S )zq
    Retrieve native memory allocations profile
    collected since browser process startup.

    :returns: 
    rJ   z Memory.getBrowserSamplingProfilerm   rn   rO   s     r   get_browser_sampling_profilerr      rp   r   c               #  V   K   ddi} | V }t                               |d                   S )zu
    Retrieve native memory allocations profile collected since last
    ``startSampling`` call.

    :returns: 
    rJ   zMemory.getSamplingProfilerm   rn   rO   s     r   get_sampling_profilert      s8       	-H >>D$$T)_555r   )rG   rH   )rG   rR   )rW   rX   rG   rR   )r^   r	   rG   rR   )NN)ra   rb   rc   rd   rG   rR   )rG   rk   )
__future__r   utilr   r   dataclassesr   enumtypingEnumr	   r!   r4   r?   rQ   rT   rV   r]   r`   rh   rj   ro   rr   rt   r   r   r   <module>r{      s   # " " " " " * * * * * * * * ! ! ! ! ! !      DI    
 
 
 
 
 
 
 
: 
 
 
 
 
 
 
 
,  
  
  
  
  
  
  
  
F   *         "   $ 3759    ,   6 6 6 66 6 6 66 6 6 6 6 6r   