zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
U
[±d˜ã@sddlmZddlmZmZddlmZddlZddlZGdd„dej    ƒZ
eGdd    „d    ƒƒZ eGd
d „d ƒƒZ eGd d „d ƒƒZ ddœdd„Zddœdd„Zddœdd„Zdddœdd„Zdddœdd„Zd,dddd œd!d"„Zddœd#d$„Zd%dœd&d'„Zd%dœd(d)„Zd%dœd*d+„ZdS)-é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassNc@s,eZdZdZdZdZdd„Zedd„ƒZdS)    Ú PressureLevelz 
    Memory pressure level.
    ZmoderateÚcriticalcCs|jS©N)Úvalue)Úself©r údd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v85/memory.pyÚto_jsonszPressureLevel.to_jsoncCs||ƒSr    r ©ÚclsÚjsonr r r Ú    from_jsonszPressureLevel.from_jsonN)    Ú__name__Ú
__module__Ú __qualname__Ú__doc__ZMODERATEÚCRITICALrÚ classmethodrr r r r r s rc@s>eZdZUdZded<ded<ded<dd„Zed    d
„ƒZd S) ÚSamplingProfileNodez
    Heap profile sample.
    ÚfloatÚsizeÚtotalztyping.List[str]ÚstackcCs2tƒ}|j|d<|j|d<dd„|jDƒ|d<|S)NrrcSsg|]}|‘qSr r ©Ú.0Úir r r Ú
<listcomp>.sz/SamplingProfileNode.to_json.<locals>.<listcomp>r)Údictrrr©r rr r r r*s
 
 
zSamplingProfileNode.to_jsoncCs,|t|dƒt|dƒdd„|dDƒdS)NrrcSsg|] }t|ƒ‘qSr )Ústrrr r r r!6sz1SamplingProfileNode.from_json.<locals>.<listcomp>r)rrr)rrr r r r1s
 
 
ýzSamplingProfileNode.from_jsonN©rrrrÚ__annotations__rrrr r r r rs
rc@s6eZdZUdZded<ded<dd„Zedd    „ƒZd
S) ÚSamplingProfilez(
    Array of heap profile samples.
    z typing.List[SamplingProfileNode]Úsamplesztyping.List[Module]ÚmodulescCs2tƒ}dd„|jDƒ|d<dd„|jDƒ|d<|S)NcSsg|] }| ¡‘qSr ©rrr r r r!Esz+SamplingProfile.to_json.<locals>.<listcomp>r(cSsg|] }| ¡‘qSr r*rr r r r!Fsr))r"r(r)r#r r r rCszSamplingProfile.to_jsoncCs(|dd„|dDƒdd„|dDƒdS)NcSsg|]}t |¡‘qSr )rrrr r r r!Lsz-SamplingProfile.from_json.<locals>.<listcomp>r(cSsg|]}t |¡‘qSr )ÚModulerrr r r r!Msr))r(r)r rr r r rIsþzSamplingProfile.from_jsonNr%r r r r r':s
r'c@sFeZdZUdZded<ded<ded<ded<dd    „Zed
d „ƒZd S) r+z'
    Executable module information
    r$ÚnameÚuuidÚ base_addressrrcCs2tƒ}|j|d<|j|d<|j|d<|j|d<|S)Nr,r-Ú baseAddressr)r"r,r-r.rr#r r r rcs 
 
 
 
zModule.to_jsoncCs0|t|dƒt|dƒt|dƒt|dƒdS)Nr,r-r/r)r,r-r.r)r$rrr r r rks 
 
 
 
üzModule.from_jsonNr%r r r r r+Qs
r+zGtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[int, int, int]])Úreturnccs0ddi}|V}t|dƒt|dƒt|dƒfS)z
 
 
    :returns: A tuple with the following items:
 
        0. **documents** - 
        1. **nodes** - 
        2. **jsEventListeners** - 
    ÚmethodzMemory.getDOMCountersZ    documentsZnodesZjsEventListeners)Úint©Úcmd_dictrr r r Úget_dom_countersus ÿ
 
 
ýr5z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]ccsddi}|V}dS)Nr1zMemory.prepareForLeakDetectionr r3r r r Úprepare_for_leak_detectionŠsÿr6ccsddi}|V}dS)z8
    Simulate OomIntervention by purging V8 memory.
    r1z$Memory.forciblyPurgeJavaScriptMemoryNr r3r r r Ú!forcibly_purge_java_script_memory’sÿr7Úbool)Ú
suppressedr0ccs"tƒ}||d<d|dœ}|V}dS)z§
    Enable/disable suppressing memory pressure notifications in all processes.
 
    :param suppressed: If true, memory pressure notifications will be suppressed.
    r9z)Memory.setPressureNotificationsSuppressed©r1ÚparamsN©r")r9r;r4rr r r Ú%set_pressure_notifications_suppressedœs þr=)Úlevelr0ccs&tƒ}| ¡|d<d|dœ}|V}dS)z
    Simulate a memory pressure notification in all processes.
 
    :param level: Memory pressure level of the notification.
    r>z#Memory.simulatePressureNotificationr:N)r"r)r>r;r4rr r r Úsimulate_pressure_notification­s  þr?ztyping.Optional[int]ztyping.Optional[bool])Úsampling_intervalÚsuppress_randomnessr0ccs:tƒ}|dk    r||d<|dk    r&||d<d|dœ}|V}dS)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.
    NZsamplingIntervalZsuppressRandomnesszMemory.startSamplingr:r<)r@rAr;r4rr r r Ústart_sampling¾s
þrBccsddi}|V}dS)z0
    Stop collecting native memory profile.
    r1zMemory.stopSamplingNr r3r r r Ú stop_samplingÔsÿrCz;typing.Generator[T_JSON_DICT, T_JSON_DICT, SamplingProfile]ccsddi}|V}t |d¡S)zr
    Retrieve native memory allocations profile
    collected since renderer process startup.
 
    :returns: 
    r1z Memory.getAllTimeSamplingProfileÚprofile©r'rr3r r r Úget_all_time_sampling_profileÞs
ÿrFccsddi}|V}t |d¡S)zq
    Retrieve native memory allocations profile
    collected since browser process startup.
 
    :returns: 
    r1z Memory.getBrowserSamplingProfilerDrEr3r r r Úget_browser_sampling_profileìs
ÿrGccsddi}|V}t |d¡S)zu
    Retrieve native memory allocations profile collected since last
    ``startSampling`` call.
 
    :returns: 
    r1zMemory.getSamplingProfilerDrEr3r r r Úget_sampling_profileús
ÿrH)NN)Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚEnumrrr'r+r5r6r7r=r?rBrCrFrGrHr r r r Ú<module>s.  #
þ