zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
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
93
94
95
96
97
98
99
U
[±dî5ã@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'd(d(dd)œd*d+„ZdGd(dd,œd-d.„Zd$dœd/d0„ZdHd(d(d(d(dd1œd2d3„ZdId(d(d(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 úld:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v111/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]útyping.Optional[bool])Úsampling_intervalÚ%include_objects_collected_by_major_gcÚ%include_objects_collected_by_minor_gcr ccsJtƒ}|dk    r||d<|dk    r&||d<|dk    r6||d<d|dœ}|V}dS)a
    :param sampling_interval: *(Optional)* Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
    :param include_objects_collected_by_major_gc: *(Optional)* By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.
    :param include_objects_collected_by_minor_gc: *(Optional)* By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.
    NZsamplingIntervalZ includeObjectsCollectedByMajorGCZ includeObjectsCollectedByMinorGCzHeapProfiler.startSamplingr?©r1)rRrSrTrArBrr r rÚstart_samplingÔs
þrV)Útrack_allocationsr ccs*tƒ}|dk    r||d<d|dœ}|V}dS)z0
    :param track_allocations: *(Optional)*
    NZtrackAllocationsz%HeapProfiler.startTrackingHeapObjectsr?rU)rWrArBrr r rÚstart_tracking_heap_objectsìsþrXccsddi}|V}t |d¡S)z5
 
 
    :returns: Recorded sampling heap profile.
    r@zHeapProfiler.stopSamplingrNrOrDr r rÚ stop_samplingüs
ÿrY)Úreport_progressÚtreat_global_objects_as_rootsÚcapture_numeric_valueÚexpose_internalsr ccsZtƒ}|dk    r||d<|dk    r&||d<|dk    r6||d<|dk    rF||d<d|dœ}|V}dS)aÜ
    :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)* Deprecated in favor of ```exposeInternals```.
    :param capture_numeric_value: *(Optional)* If true, numerical values are included in the snapshot
    :param expose_internals: **(EXPERIMENTAL)** *(Optional)* If true, exposes internals of the snapshot.
    NÚreportProgressÚtreatGlobalObjectsAsRootsÚcaptureNumericValueÚexposeInternalsz$HeapProfiler.stopTrackingHeapObjectsr?rU©rZr[r\r]rArBrr r rÚstop_tracking_heap_objects    s þrcccsZtƒ}|dk    r||d<|dk    r&||d<|dk    r6||d<|dk    rF||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 artificial roots will be generated. Deprecated in favor of ```exposeInternals```.
    :param capture_numeric_value: *(Optional)* If true, numerical values are included in the snapshot
    :param expose_internals: **(EXPERIMENTAL)** *(Optional)* If true, exposes internals of the snapshot.
    Nr^r_r`razHeapProfiler.takeHeapSnapshotr?rUrbr r rÚtake_heap_snapshot%s þrdz!HeapProfiler.addHeapSnapshotChunkc@s*eZdZUded<edddœdd„ƒZdS)ÚAddHeapSnapshotChunkr    ÚchunkrrcCs|t|dƒdS)Nrf)rf)r    rr r rrFs
ÿzAddHeapSnapshotChunk.from_jsonN©rrrr5r rr r r rreAs
rezHeapProfiler.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 rr0[sz-HeapStatsUpdate.from_json.<locals>.<listcomp>Z statsUpdate)rir rr r rrXsÿzHeapStatsUpdate.from_jsonN©rrrrr5r rr r r rrhMs
rhzHeapProfiler.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)NZlastSeenObjectIdrm)rlrm)r&r$rr r rrjs
 
þzLastSeenObjectId.from_jsonNrjr r r rrk_s
 
rkz'HeapProfiler.reportHeapSnapshotProgressc@s:eZdZUded<ded<ded<edddœdd    „ƒZd
S) ÚReportHeapSnapshotProgressr&ÚdoneÚtotalrQÚfinishedrrcCs2|t|dƒt|dƒd|kr*t|dƒnddS)Nrorprq)rorprq)r&Úboolrr r rrys
 
 
ýz$ReportHeapSnapshotProgress.from_jsonNrgr r r rrnrs
 
rnzHeapProfiler.resetProfilesc@s eZdZedddœdd„ƒZdS)Ú ResetProfilesrrcCs|ƒSr r rr r rr‡szResetProfiles.from_jsonN)rrrr rr r r rrs‚srs)N)NNN)N)NNNN)NNNN)!Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚrr    rr"r6r;rCrErFrGrJrMrPrVrXrYrcrdrerhrkrnrsr r r rÚ<module>sh   "þýÿüü