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
86
87
88
89
90
91
92
U
[±dÇ+ã@sÖddlmZddlmZmZddlmZddlZddlZddl    m
Z
Gdd„de ƒZ eGd    d
„d
ƒƒZ eGd d „d ƒƒZeGd d„dƒƒZdddœdd„Zddœdd„Zddœdd„Zddœdd„Zdddœdd„ZdEddd d!œd"d#„Zd$dœd%d&„ZdFd'dd(œd)d*„ZdGd+dd,œd-d.„Zd$dœd/d0„ZdHd+d+dd1œd2d3„ZdId+d+dd1œd4d5„Zed6ƒeGd7d8„d8ƒƒƒZed9ƒeGd:d;„d;ƒƒƒZed<ƒeGd=d>„d>ƒƒƒZed?ƒeGd@dA„dAƒƒƒZedBƒeGdCdD„dDƒƒƒZ dS)Jé)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassN)ÚruntimecsBeZdZdZddœdd„Zedddœdd„ƒZ‡fd    d
„Z‡ZS) ÚHeapSnapshotObjectIdz"
    Heap snapshot object id.
    Ústr©ÚreturncCs|S©N©©Úselfr r úkd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v85/heap_profiler.pyÚto_jsonszHeapSnapshotObjectId.to_json©Újsonr cCs||ƒSr r ©Úclsrr r rÚ    from_jsonszHeapSnapshotObjectId.from_jsoncsd tƒ ¡¡S)NzHeapSnapshotObjectId({}))ÚformatÚsuperÚ__repr__r©Ú    __class__r rrszHeapSnapshotObjectId.__repr__)    Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ classmethodrrÚ __classcell__r r rrrs
rc@sFeZdZUdZded<ded<ded<ded    <d
d „Zed d „ƒZdS)ÚSamplingHeapProfileNodezh
    Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
    zruntime.CallFrameÚ
call_frameÚfloatÚ    self_sizeÚintÚid_z$typing.List[SamplingHeapProfileNode]ÚchildrencCs@tƒ}|j ¡|d<|j|d<|j|d<dd„|jDƒ|d<|S)NÚ    callFrameÚselfSizeÚidcSsg|] }| ¡‘qSr ©r©Ú.0Úir r rÚ
<listcomp>4sz3SamplingHeapProfileNode.to_json.<locals>.<listcomp>r()Údictr#rr%r'r(©rrr r rr/s 
 
zSamplingHeapProfileNode.to_jsoncCs:|tj |d¡t|dƒt|dƒdd„|dDƒdS)Nr)r*r+cSsg|]}t |¡‘qSr ©r"rr-r r rr0=sz5SamplingHeapProfileNode.from_json.<locals>.<listcomp>r()r#r%r'r()rZ    CallFramerr$r&rr r rr7s 
 
üz!SamplingHeapProfileNode.from_jsonN©rrrrÚ__annotations__rr rr r r rr"s
r"c@s>eZdZUdZded<ded<ded<dd„Zed    d
„ƒZd S) ÚSamplingHeapProfileSamplez2
    A single sample from a sampling profile.
    r$Úsizer&Únode_idÚordinalcCs(tƒ}|j|d<|j|d<|j|d<|S)Nr7ÚnodeIdr9)r1r7r8r9r2r r rrPs
 
 
 
z!SamplingHeapProfileSample.to_jsoncCs&|t|dƒt|dƒt|dƒdS)Nr7r:r9)r7r8r9)r$r&rr r rrWs
 
 
 
ýz#SamplingHeapProfileSample.from_jsonNr4r r r rr6As
r6c@s6eZdZUdZded<ded<dd„Zedd    „ƒZd
S) ÚSamplingHeapProfilez
    Sampling profile.
    r"Úheadz&typing.List[SamplingHeapProfileSample]ÚsamplescCs,tƒ}|j ¡|d<dd„|jDƒ|d<|S)Nr<cSsg|] }| ¡‘qSr r,r-r r rr0lsz/SamplingHeapProfile.to_json.<locals>.<listcomp>r=)r1r<rr=r2r r rriszSamplingHeapProfile.to_jsoncCs$|t |d¡dd„|dDƒdS)Nr<cSsg|]}t |¡‘qSr )r6rr-r r rr0ssz1SamplingHeapProfile.from_json.<locals>.<listcomp>r=)r<r=r3rr r rros þzSamplingHeapProfile.from_jsonNr4r r r rr;`s
r;z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])Úheap_object_idr ccs&tƒ}| ¡|d<d|dœ}|V}dS)zã
    Enables console to refer to the node with given id via $x (see Command Line API for more details
    $x functions).
 
    :param heap_object_id: Heap snapshot object id to be accessible by means of $x command line API.
    Z heapObjectIdz#HeapProfiler.addInspectedHeapObject©ÚmethodÚparamsN)r1r)r>rAÚcmd_dictrr r rÚadd_inspected_heap_objectws      þrCr
ccsddi}|V}dS)Nr@zHeapProfiler.collectGarbager ©rBrr r rÚcollect_garbage‰sÿrEccsddi}|V}dS)Nr@zHeapProfiler.disabler rDr r rÚdisable‘sÿrFccsddi}|V}dS)Nr@zHeapProfiler.enabler rDr r rÚenable™sÿrGzruntime.RemoteObjectIdz@typing.Generator[T_JSON_DICT, T_JSON_DICT, HeapSnapshotObjectId])Ú    object_idr ccs0tƒ}| ¡|d<d|dœ}|V}t |d¡S)zª
    :param object_id: Identifier of the object to get heap object id for.
    :returns: Id of the heap snapshot object corresponding to the passed remote object id.
    ÚobjectIdzHeapProfiler.getHeapObjectIdr?ZheapSnapshotObjectId)r1rrr)rHrArBrr r rÚget_heap_object_id¡s þrJztyping.Optional[str]z@typing.Generator[T_JSON_DICT, T_JSON_DICT, runtime.RemoteObject])rHÚ object_groupr ccsBtƒ}| ¡|d<|dk    r"||d<d|dœ}|V}tj |d¡S)z¤
    :param object_id:
    :param object_group: *(Optional)* Symbolic group name that can be used to release multiple objects.
    :returns: Evaluation result.
    rINZ objectGroupz$HeapProfiler.getObjectByHeapObjectIdr?Úresult)r1rrZ RemoteObjectr)rHrKrArBrr r rÚget_object_by_heap_object_id²s     þrMz?typing.Generator[T_JSON_DICT, T_JSON_DICT, SamplingHeapProfile]ccsddi}|V}t |d¡S)zB
 
 
    :returns: Return the sampling profile being collected.
    r@zHeapProfiler.getSamplingProfileÚprofile©r;rrDr r rÚget_sampling_profileÇs
ÿrPztyping.Optional[float])Úsampling_intervalr ccs*tƒ}|dk    r||d<d|dœ}|V}dS)z¤
    :param sampling_interval: *(Optional)* Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
    NZsamplingIntervalzHeapProfiler.startSamplingr?©r1)rQrArBrr r rÚstart_samplingÔsþrSútyping.Optional[bool])Útrack_allocationsr ccs*tƒ}|dk    r||d<d|dœ}|V}dS)z0
    :param track_allocations: *(Optional)*
    NZtrackAllocationsz%HeapProfiler.startTrackingHeapObjectsr?rR)rUrArBrr r rÚstart_tracking_heap_objectsäsþrVccsddi}|V}t |d¡S)z5
 
 
    :returns: Recorded sampling heap profile.
    r@zHeapProfiler.stopSamplingrNrOrDr r rÚ stop_samplingôs
ÿrW)Úreport_progressÚtreat_global_objects_as_rootsr ccs:tƒ}|dk    r||d<|dk    r&||d<d|dœ}|V}dS)zß
    :param report_progress: *(Optional)* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
    :param treat_global_objects_as_roots: *(Optional)*
    NÚreportProgressÚtreatGlobalObjectsAsRootsz$HeapProfiler.stopTrackingHeapObjectsr?rR©rXrYrArBrr r rÚstop_tracking_heap_objectssþr]ccs:tƒ}|dk    r||d<|dk    r&||d<d|dœ}|V}dS)a
    :param report_progress: *(Optional)* If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
    :param treat_global_objects_as_roots: *(Optional)* If true, a raw snapshot without artifical roots will be generated
    NrZr[zHeapProfiler.takeHeapSnapshotr?rRr\r r rÚtake_heap_snapshotsþr^z!HeapProfiler.addHeapSnapshotChunkc@s*eZdZUded<edddœdd„ƒZdS)ÚAddHeapSnapshotChunkr    ÚchunkrrcCs|t|dƒdS)Nr`)r`)r    rr r rr.s
ÿzAddHeapSnapshotChunk.from_jsonN©rrrr5r rr r r rr_)s
r_zHeapProfiler.heapStatsUpdatec@s.eZdZUdZded<edddœdd„ƒZdS)    ÚHeapStatsUpdatezj
    If heap objects tracking has been started then backend may send update for one or more fragments
    ztyping.List[int]Ú stats_updaterrcCs|dd„|dDƒdS)NcSsg|] }t|ƒ‘qSr )r&r-r r rr0Csz-HeapStatsUpdate.from_json.<locals>.<listcomp>Z statsUpdate)rcr rr r rr@sÿzHeapStatsUpdate.from_jsonN©rrrrr5r rr r r rrb5s
rbzHeapProfiler.lastSeenObjectIdc@s6eZdZUdZded<ded<edddœdd    „ƒZd
S) ÚLastSeenObjectIda(
    If heap objects tracking has been started then backend regularly sends a current value for last
    seen object id and corresponding timestamp. If the were changes in the heap since last event
    then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
    r&Úlast_seen_object_idr$Ú    timestamprrcCs|t|dƒt|dƒdS)NZlastSeenObjectIdrg)rfrg)r&r$rr r rrRs
 
þzLastSeenObjectId.from_jsonNrdr r r rreGs
 
rez'HeapProfiler.reportHeapSnapshotProgressc@s:eZdZUded<ded<ded<edddœdd    „ƒZd
S) ÚReportHeapSnapshotProgressr&ÚdoneÚtotalrTÚfinishedrrcCs2|t|dƒt|dƒd|kr*t|dƒnddS)Nrirjrk)rirjrk)r&Úboolrr r rras
 
 
ýz$ReportHeapSnapshotProgress.from_jsonNrar r r rrhZs
 
rhzHeapProfiler.resetProfilesc@s eZdZedddœdd„ƒZdS)Ú ResetProfilesrrcCs|ƒSr r rr r rroszResetProfiles.from_jsonN)rrrr rr r r rrmjsrm)N)N)N)NN)NN)!Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚrr    rr"r6r;rCrErFrGrJrMrPrSrVrWr]r^r_rbrerhrmr r r rÚ<module>s\   "þÿÿþþ