vendor/github.com/go-rod/rod/lib/proto/memory.go
222 lines · 6648 bytes
1// This file is generated by "./lib/proto/generate"
2
3package proto
4
5/*
6
7Memory
8
9*/
10
11// MemoryPressureLevel Memory pressure level.
12type MemoryPressureLevel string
13
14const (
15 // MemoryPressureLevelModerate enum const.
16 MemoryPressureLevelModerate MemoryPressureLevel = "moderate"
17
18 // MemoryPressureLevelCritical enum const.
19 MemoryPressureLevelCritical MemoryPressureLevel = "critical"
20)
21
22// MemorySamplingProfileNode Heap profile sample.
23type MemorySamplingProfileNode struct {
24 // Size of the sampled allocation.
25 Size float64 `json:"size"`
26
27 // Total bytes attributed to this sample.
28 Total float64 `json:"total"`
29
30 // Stack Execution stack at the point of allocation.
31 Stack []string `json:"stack"`
32}
33
34// MemorySamplingProfile Array of heap profile samples.
35type MemorySamplingProfile struct {
36 // Samples ...
37 Samples []*MemorySamplingProfileNode `json:"samples"`
38
39 // Modules ...
40 Modules []*MemoryModule `json:"modules"`
41}
42
43// MemoryModule Executable module information.
44type MemoryModule struct {
45 // Name of the module.
46 Name string `json:"name"`
47
48 // UUID of the module.
49 UUID string `json:"uuid"`
50
51 // BaseAddress Base address where the module is loaded into memory. Encoded as a decimal
52 // or hexadecimal (0x prefixed) string.
53 BaseAddress string `json:"baseAddress"`
54
55 // Size of the module in bytes.
56 Size float64 `json:"size"`
57}
58
59// MemoryGetDOMCounters ...
60type MemoryGetDOMCounters struct{}
61
62// ProtoReq name.
63func (m MemoryGetDOMCounters) ProtoReq() string { return "Memory.getDOMCounters" }
64
65// Call the request.
66func (m MemoryGetDOMCounters) Call(c Client) (*MemoryGetDOMCountersResult, error) {
67 var res MemoryGetDOMCountersResult
68 return &res, call(m.ProtoReq(), m, &res, c)
69}
70
71// MemoryGetDOMCountersResult ...
72type MemoryGetDOMCountersResult struct {
73 // Documents ...
74 Documents int `json:"documents"`
75
76 // Nodes ...
77 Nodes int `json:"nodes"`
78
79 // JsEventListeners ...
80 JsEventListeners int `json:"jsEventListeners"`
81}
82
83// MemoryPrepareForLeakDetection ...
84type MemoryPrepareForLeakDetection struct{}
85
86// ProtoReq name.
87func (m MemoryPrepareForLeakDetection) ProtoReq() string { return "Memory.prepareForLeakDetection" }
88
89// Call sends the request.
90func (m MemoryPrepareForLeakDetection) Call(c Client) error {
91 return call(m.ProtoReq(), m, nil, c)
92}
93
94// MemoryForciblyPurgeJavaScriptMemory Simulate OomIntervention by purging V8 memory.
95type MemoryForciblyPurgeJavaScriptMemory struct{}
96
97// ProtoReq name.
98func (m MemoryForciblyPurgeJavaScriptMemory) ProtoReq() string {
99 return "Memory.forciblyPurgeJavaScriptMemory"
100}
101
102// Call sends the request.
103func (m MemoryForciblyPurgeJavaScriptMemory) Call(c Client) error {
104 return call(m.ProtoReq(), m, nil, c)
105}
106
107// MemorySetPressureNotificationsSuppressed Enable/disable suppressing memory pressure notifications in all processes.
108type MemorySetPressureNotificationsSuppressed struct {
109 // Suppressed If true, memory pressure notifications will be suppressed.
110 Suppressed bool `json:"suppressed"`
111}
112
113// ProtoReq name.
114func (m MemorySetPressureNotificationsSuppressed) ProtoReq() string {
115 return "Memory.setPressureNotificationsSuppressed"
116}
117
118// Call sends the request.
119func (m MemorySetPressureNotificationsSuppressed) Call(c Client) error {
120 return call(m.ProtoReq(), m, nil, c)
121}
122
123// MemorySimulatePressureNotification Simulate a memory pressure notification in all processes.
124type MemorySimulatePressureNotification struct {
125 // Level Memory pressure level of the notification.
126 Level MemoryPressureLevel `json:"level"`
127}
128
129// ProtoReq name.
130func (m MemorySimulatePressureNotification) ProtoReq() string {
131 return "Memory.simulatePressureNotification"
132}
133
134// Call sends the request.
135func (m MemorySimulatePressureNotification) Call(c Client) error {
136 return call(m.ProtoReq(), m, nil, c)
137}
138
139// MemoryStartSampling Start collecting native memory profile.
140type MemoryStartSampling struct {
141 // SamplingInterval (optional) Average number of bytes between samples.
142 SamplingInterval *int `json:"samplingInterval,omitempty"`
143
144 // SuppressRandomness (optional) Do not randomize intervals between samples.
145 SuppressRandomness bool `json:"suppressRandomness,omitempty"`
146}
147
148// ProtoReq name.
149func (m MemoryStartSampling) ProtoReq() string { return "Memory.startSampling" }
150
151// Call sends the request.
152func (m MemoryStartSampling) Call(c Client) error {
153 return call(m.ProtoReq(), m, nil, c)
154}
155
156// MemoryStopSampling Stop collecting native memory profile.
157type MemoryStopSampling struct{}
158
159// ProtoReq name.
160func (m MemoryStopSampling) ProtoReq() string { return "Memory.stopSampling" }
161
162// Call sends the request.
163func (m MemoryStopSampling) Call(c Client) error {
164 return call(m.ProtoReq(), m, nil, c)
165}
166
167// MemoryGetAllTimeSamplingProfile Retrieve native memory allocations profile
168// collected since renderer process startup.
169type MemoryGetAllTimeSamplingProfile struct{}
170
171// ProtoReq name.
172func (m MemoryGetAllTimeSamplingProfile) ProtoReq() string { return "Memory.getAllTimeSamplingProfile" }
173
174// Call the request.
175func (m MemoryGetAllTimeSamplingProfile) Call(c Client) (*MemoryGetAllTimeSamplingProfileResult, error) {
176 var res MemoryGetAllTimeSamplingProfileResult
177 return &res, call(m.ProtoReq(), m, &res, c)
178}
179
180// MemoryGetAllTimeSamplingProfileResult ...
181type MemoryGetAllTimeSamplingProfileResult struct {
182 // Profile ...
183 Profile *MemorySamplingProfile `json:"profile"`
184}
185
186// MemoryGetBrowserSamplingProfile Retrieve native memory allocations profile
187// collected since browser process startup.
188type MemoryGetBrowserSamplingProfile struct{}
189
190// ProtoReq name.
191func (m MemoryGetBrowserSamplingProfile) ProtoReq() string { return "Memory.getBrowserSamplingProfile" }
192
193// Call the request.
194func (m MemoryGetBrowserSamplingProfile) Call(c Client) (*MemoryGetBrowserSamplingProfileResult, error) {
195 var res MemoryGetBrowserSamplingProfileResult
196 return &res, call(m.ProtoReq(), m, &res, c)
197}
198
199// MemoryGetBrowserSamplingProfileResult ...
200type MemoryGetBrowserSamplingProfileResult struct {
201 // Profile ...
202 Profile *MemorySamplingProfile `json:"profile"`
203}
204
205// MemoryGetSamplingProfile Retrieve native memory allocations profile collected since last
206// `startSampling` call.
207type MemoryGetSamplingProfile struct{}
208
209// ProtoReq name.
210func (m MemoryGetSamplingProfile) ProtoReq() string { return "Memory.getSamplingProfile" }
211
212// Call the request.
213func (m MemoryGetSamplingProfile) Call(c Client) (*MemoryGetSamplingProfileResult, error) {
214 var res MemoryGetSamplingProfileResult
215 return &res, call(m.ProtoReq(), m, &res, c)
216}
217
218// MemoryGetSamplingProfileResult ...
219type MemoryGetSamplingProfileResult struct {
220 // Profile ...
221 Profile *MemorySamplingProfile `json:"profile"`
222}