
     f83                    N   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ddl	m
Z
  G d de          Ze G d	 d
                      Z G d dej                  Z G d dej                  Z G d dej                  Z G d dej                  Zd:dZd;dZd<dZ	 	 d=d>d Z	 	 	 	 	 	 	 	 	 d?d@d0Z ed1          e G d2 d3                                  Z ed4          e G d5 d6                                  Z ed7          e G d8 d9                                  ZdS )A    )annotations   )event_classT_JSON_DICT)	dataclassN)ioc                  B     e Zd ZdZddZed	d            Z fdZ xZS )
MemoryDumpConfigz[
    Configuration for memory dump. Used only when "memory-infra" category is enabled.
    returndictc                    | S N selfs    r/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/selenium/webdriver/common/devtools/v126/tracing.pyto_jsonzMemoryDumpConfig.to_json   s        jsonc                     | |          S r   r   clsr   s     r   	from_jsonzMemoryDumpConfig.from_json       s4yyr   c                j    d                     t                                                                S )NzMemoryDumpConfig({}))formatsuper__repr__)r   	__class__s    r   r   zMemoryDumpConfig.__repr__   s'    %,,UWW-=-=-?-?@@@r   )r   r   )r   r   r   r
   )	__name__
__module____qualname____doc__r   classmethodr   r   __classcell__)r   s   @r   r
   r
      s                [A A A A A A A A Ar   r
   c                      e Zd ZU dZded<   dZded<   dZded<   dZded<   dZded	<   dZ	d
ed<   dZ
d
ed<   dZd
ed<   dZded<   d Zed             ZdS )TraceConfigNtyping.Optional[str]record_modetyping.Optional[float]trace_buffer_size_in_kbtyping.Optional[bool]enable_samplingenable_systraceenable_argument_filterz!typing.Optional[typing.List[str]]included_categoriesexcluded_categoriessynthetic_delaysz!typing.Optional[MemoryDumpConfig]memory_dump_configc                   t                      }| j        
| j        |d<   | j        
| j        |d<   | j        
| j        |d<   | j        
| j        |d<   | j        
| j        |d<   | j        d | j        D             |d<   | j        d | j        D             |d	<   | j        d
 | j        D             |d<   | j	        | j	        
                                |d<   |S )N
recordModetraceBufferSizeInKbenableSamplingenableSystraceenableArgumentFilterc                    g | ]}|S r   r   .0is     r   
<listcomp>z'TraceConfig.to_json.<locals>.<listcomp>I       )N)N)N!)N)N)Nr   includedCategoriesc                    g | ]}|S r   r   r;   s     r   r>   z'TraceConfig.to_json.<locals>.<listcomp>K   r?   r   excludedCategoriesc                    g | ]}|S r   r   r;   s     r   r>   z'TraceConfig.to_json.<locals>.<listcomp>M   s    &H&H&HQq&H&H&Hr   syntheticDelaysmemoryDumpConfig)r   r)   r+   r-   r.   r/   r0   r1   r2   r3   r   )r   r   s     r   r   zTraceConfig.to_json<   s   vv'!%!1D'3*.*FD&'+%)%9D!"+%)%9D!"&2+/+FD'(#/)N)NT5M)N)N)ND%&#/)N)NT5M)N)N)ND%& ,&H&H$2G&H&H&HD"#".'+'>'F'F'H'HD#$r   c                    | d|v rt          |d                   nd d|v rt          |d                   nd d|v rt          |d                   nd d|v rt          |d                   nd d|v rt          |d                   nd d|v rd |d         D             nd d|v rd	 |d         D             nd d
|v rd |d
         D             nd d|v r t                              |d                   nd 	  	        S )Nr5   r6   r7   r8   r9   r@   c                ,    g | ]}t          |          S r   strr;   s     r   r>   z)TraceConfig.from_json.<locals>.<listcomp>Z        L L LAQ L L Lr   rB   c                ,    g | ]}t          |          S r   rH   r;   s     r   r>   z)TraceConfig.from_json.<locals>.<listcomp>[   rJ   r   rD   c                ,    g | ]}t          |          S r   rH   r;   s     r   r>   z)TraceConfig.from_json.<locals>.<listcomp>\   s    FFFc!ffFFFr   rE   )	r)   r+   r-   r.   r/   r0   r1   r2   r3   )rI   floatboolr
   r   r   s     r   r   zTraceConfig.from_jsonR   sf   s3?43G3GD.///TJ_cgJgJgE$/D*E$F$F$Fmq<LPT<T<TD&6!7888Z^<LPT<T<TD&6!7888Z^I_cgIgIg4-C(D#E#E#EmqPdhlPlPl L L6J1K L L L LrvPdhlPlPl L L6J1K L L L LrvJ[_cJcJcFFd3D.EFFFFimWimqWqWq/99$?Q:RSSSw{

 

 

 
	
r   )r    r!   r"   r)   __annotations__r+   r-   r.   r/   r0   r1   r2   r3   r   r$   r   r   r   r   r'   r'      s          )-K,,,, 7;:::: .2O1111 .2O1111 598888 >BAAAA >BAAAA ;?>>>> =A@@@@  , 
 
 [
 
 
r   r'   c                  6    e Zd ZdZdZdZd Zed             ZdS )StreamFormatz
    Data format of a trace. Can be either the legacy JSON format or the
    protocol buffer format. Note that the JSON format will be deprecated soon.
    r   protoc                    | j         S r   valuer   s    r   r   zStreamFormat.to_jsoni   
    zr   c                     | |          S r   r   r   s     r   r   zStreamFormat.from_jsonl   r   r   N)	r    r!   r"   r#   JSONPROTOr   r$   r   r   r   r   rQ   rQ   a   sT          DE     [  r   rQ   c                  6    e Zd ZdZdZdZd Zed             ZdS )StreamCompressionzB
    Compression type to use for traces returned via streams.
    nonegzipc                    | j         S r   rT   r   s    r   r   zStreamCompression.to_jsonx   rV   r   c                     | |          S r   r   r   s     r   r   zStreamCompression.from_json{   r   r   N)	r    r!   r"   r#   NONEGZIPr   r$   r   r   r   r   r[   r[   q   sT          DD     [  r   r[   c                  :    e Zd ZdZdZdZdZd Zed             Z	dS )MemoryDumpLevelOfDetailz
    Details exposed when memory request explicitly declared.
    Keep consistent with memory_dump_request_args.h and
    memory_instrumentation.mojom
    
backgroundlightdetailedc                    | j         S r   rT   r   s    r   r   zMemoryDumpLevelOfDetail.to_json   rV   r   c                     | |          S r   r   r   s     r   r   z!MemoryDumpLevelOfDetail.from_json   r   r   N)
r    r!   r"   r#   
BACKGROUNDLIGHTDETAILEDr   r$   r   r   r   r   rc   rc      sY         
 JEH     [  r   rc   c                  :    e Zd ZdZdZdZdZd Zed             Z	dS )TracingBackenda  
    Backend type to use for tracing. ``chrome`` uses the Chrome-integrated
    tracing service and is supported on all platforms. ``system`` is only
    supported on Chrome OS and uses the Perfetto system tracing service.
    ``auto`` chooses ``system`` when the perfettoConfig provided to Tracing.start
    specifies at least one non-Chrome data source; otherwise uses ``chrome``.
    autochromesystemc                    | j         S r   rT   r   s    r   r   zTracingBackend.to_json   rV   r   c                     | |          S r   r   r   s     r   r   zTracingBackend.from_json   r   r   N)
r    r!   r"   r#   AUTOCHROMESYSTEMr   r$   r   r   r   r   rm   rm      sY          DFF     [  r   rm   r   0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]c               #     K   ddi} | V }dS )z'
    Stop trace events collection.
    methodzTracing.endNr   cmd_dictr   s     r   endr{      s#      
 	-H >>DDDr   <typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]]c               #  :   K   ddi} | V }d |d         D             S )zy
    Gets supported tracing categories.

    **EXPERIMENTAL**

    :returns: A list of supported tracing categories.
    rx   zTracing.getCategoriesc                ,    g | ]}t          |          S r   rH   r;   s     r   r>   z"get_categories.<locals>.<listcomp>   s    ///qCFF///r   
categoriesr   ry   s     r   get_categoriesr      s9       	)H >>D//D.////r   sync_idrI   c              #  B   K   t                      }| |d<   d|d}|V }dS )z~
    Record a clock sync marker in the trace.

    **EXPERIMENTAL**

    :param sync_id: The ID of this clock sync marker
    syncIdzTracing.recordClockSyncMarkerrx   paramsNr   )r   r   rz   r   s       r   record_clock_sync_markerr      s<       &&FF81 H >>DDDr   deterministicr,   level_of_detail(typing.Optional[MemoryDumpLevelOfDetail]Ctyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[str, bool]]c              #     K   t                      }| | |d<   ||                                |d<   d|d}|V }t          |d                   t          |d                   fS )a  
    Request a global memory dump.

    **EXPERIMENTAL**

    :param deterministic: *(Optional)* Enables more deterministic results by forcing garbage collection
    :param level_of_detail: *(Optional)* Specifies level of details in memory dump. Defaults to "detailed".
    :returns: A tuple with the following items:

        0. **dumpGuid** - GUID of the resulting global memory dump.
        1. **success** - True iff the global memory dump succeeded.
    Nr   levelOfDetailzTracing.requestMemoryDumpr   dumpGuidsuccess)r   r   rI   rN   )r   r   r   rz   r   s        r   request_memory_dumpr      s        &&F "/""1"9"9";";- H >>DDT)_ r   r   r(   optionsbuffer_usage_reporting_intervalr*   transfer_modestream_formattyping.Optional[StreamFormat]stream_compression"typing.Optional[StreamCompression]trace_configtyping.Optional[TraceConfig]perfetto_configtracing_backendtyping.Optional[TracingBackend]c	              #  F  K   t                      }	| | |	d<   |||	d<   |||	d<   |||	d<   ||                                |	d<   ||                                |	d<   ||                                |	d<   |||	d	<   ||                                |	d
<   d|	d}
|
V }dS )a  
    Start trace events collection.

    :param categories: **(EXPERIMENTAL)** *(Optional)* Category/tag filter
    :param options: **(EXPERIMENTAL)** *(Optional)* Tracing options
    :param buffer_usage_reporting_interval: **(EXPERIMENTAL)** *(Optional)* If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
    :param transfer_mode: *(Optional)* Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ```ReportEvents````).
    :param stream_format: *(Optional)* Trace data format to use. This only applies when using ````ReturnAsStream```` transfer mode (defaults to ````json````).
    :param stream_compression: **(EXPERIMENTAL)** *(Optional)* Compression format to use. This only applies when using ````ReturnAsStream```` transfer mode (defaults to ````none````)
    :param trace_config: *(Optional)*
    :param perfetto_config: **(EXPERIMENTAL)** *(Optional)* Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters ````categories````, ````options````, ````traceConfig```` are ignored.
    :param tracing_backend: **(EXPERIMENTAL)** *(Optional)* Backend type (defaults to ````auto```)
    Nr   r   bufferUsageReportingIntervaltransferModestreamFormatstreamCompressiontraceConfigperfettoConfigtracingBackendzTracing.startr   )r   r   )r   r   r   r   r   r   r   r   r   r   rz   r   s               r   startr      s      0 &&F)|#y&21P-. !.~ !.!6!6!8!8~%&8&@&@&B&B"# , 4 4 6 6}"#2 "#2#:#:#<#< ! H >>DDDr   zTracing.bufferUsagec                  J    e Zd ZU dZded<   ded<   ded<   edd	            Zd
S )BufferUsagez
    **EXPERIMENTAL**


    r*   percent_fullevent_countrU   r   r   r   c                     | d|v rt          |d                   nd d|v rt          |d                   nd d|v rt          |d                   nd           S )NpercentFull
eventCountrU   )r   r   rU   )rM   r   s     r   r   zBufferUsage.from_json5  sv    s7D7L7LtM2333RV5AT5I5Id<0111t*1T//%W&&&t
 
 
 	
r   N)r   r   r   r   r    r!   r"   r#   rO   r$   r   r   r   r   r   r   $  sf           )((('''' "!!!
 
 
 [
 
 
r   r   zTracing.dataCollectedc                  6    e Zd ZU dZded<   ed	d            ZdS )
DataCollectedz
    **EXPERIMENTAL**

    Contains a bucket of collected trace events. When tracing is stopped collected events will be
    sent as a sequence of dataCollected events followed by tracingComplete event.
    ztyping.List[dict]rU   r   r   r   c                :     | d |d         D                       S )Nc                ,    g | ]}t          |          S r   r   r;   s     r   r>   z+DataCollected.from_json.<locals>.<listcomp>L  s    222q477222r   rU   rT   r   r   s     r   r   zDataCollected.from_jsonI  s0    s22DM222
 
 
 	
r   N)r   r   r   r   r   r   r   r   r   r   >  sL           
 
 
 [
 
 
r   r   zTracing.tracingCompletec                  T    e Zd ZU dZded<   ded<   ded<   ded	<   edd            ZdS )TracingCompletez
    Signals that tracing is stopped and there is no trace buffers pending flush, all data were
    delivered via dataCollected events.
    rN   data_loss_occurredz typing.Optional[io.StreamHandle]streamr   trace_formatr   r   r   r   r   c           	     (    | t          |d                   d|v r%t          j                            |d                   nd d|v r t                              |d                   nd d|v r t
                              |d                   nd           S )NdataLossOccurredr   traceFormatr   )r   r   r   r   )rN   r   StreamHandler   rQ   r[   r   s     r   r   zTracingComplete.from_jsona  s    s#D);$<==@HD@P@P2?,,T(^<<<VZHUY]H]H]//]0CDDDcgYlptYtYt0::4@S;TUUUz~	
 
 
 	
r   N)r   r   r   r   r   r   r   r   r   r   P  sp           ,,,,////::::
 
 
 [
 
 
r   r   )r   rv   )r   r|   )r   rI   r   rv   )NN)r   r,   r   r   r   r   )	NNNNNNNNN)r   r(   r   r(   r   r*   r   r(   r   r   r   r   r   r   r   r(   r   r   r   rv   )
__future__r   utilr   r   dataclassesr   enumtyping r   r   r
   r'   EnumrQ   r[   rc   rm   r{   r   r   r   r   r   r   r   r   r   r   <module>r      s   # " " " " " * * * * * * * * ! ! ! ! ! !        A A A A At A A A ?
 ?
 ?
 ?
 ?
 ?
 ?
 ?
D    49        	       di   $    TY   (   0 0 0 0   ( 04DH    B ,0(,BF.27;AE5904;?/ / / / /d "##

 
 
 
 
 
 
  $#
0 $%%

 
 
 
 
 
 
  &%
  &''

 
 
 
 
 
 
  ('
 
 
r   