vendor/github.com/go-rod/rod/lib/proto/heap_profiler.go

346 lines · 12299 bytes

  1// This file is generated by "./lib/proto/generate"
  2
  3package proto
  4
  5/*
  6
  7HeapProfiler
  8
  9*/
 10
 11// HeapProfilerHeapSnapshotObjectID Heap snapshot object id.
 12type HeapProfilerHeapSnapshotObjectID string
 13
 14// HeapProfilerSamplingHeapProfileNode Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
 15type HeapProfilerSamplingHeapProfileNode struct {
 16	// CallFrame Function location.
 17	CallFrame *RuntimeCallFrame `json:"callFrame"`
 18
 19	// SelfSize Allocations size in bytes for the node excluding children.
 20	SelfSize float64 `json:"selfSize"`
 21
 22	// ID Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
 23	ID int `json:"id"`
 24
 25	// Children Child nodes.
 26	Children []*HeapProfilerSamplingHeapProfileNode `json:"children"`
 27}
 28
 29// HeapProfilerSamplingHeapProfileSample A single sample from a sampling profile.
 30type HeapProfilerSamplingHeapProfileSample struct {
 31	// Size Allocation size in bytes attributed to the sample.
 32	Size float64 `json:"size"`
 33
 34	// NodeID Id of the corresponding profile tree node.
 35	NodeID int `json:"nodeId"`
 36
 37	// Ordinal Time-ordered sample ordinal number. It is unique across all profiles retrieved
 38	// between startSampling and stopSampling.
 39	Ordinal float64 `json:"ordinal"`
 40}
 41
 42// HeapProfilerSamplingHeapProfile Sampling profile.
 43type HeapProfilerSamplingHeapProfile struct {
 44	// Head ...
 45	Head *HeapProfilerSamplingHeapProfileNode `json:"head"`
 46
 47	// Samples ...
 48	Samples []*HeapProfilerSamplingHeapProfileSample `json:"samples"`
 49}
 50
 51// HeapProfilerAddInspectedHeapObject Enables console to refer to the node with given id via $x (see Command Line API for more details
 52// $x functions).
 53type HeapProfilerAddInspectedHeapObject struct {
 54	// HeapObjectID Heap snapshot object id to be accessible by means of $x command line API.
 55	HeapObjectID HeapProfilerHeapSnapshotObjectID `json:"heapObjectId"`
 56}
 57
 58// ProtoReq name.
 59func (m HeapProfilerAddInspectedHeapObject) ProtoReq() string {
 60	return "HeapProfiler.addInspectedHeapObject"
 61}
 62
 63// Call sends the request.
 64func (m HeapProfilerAddInspectedHeapObject) Call(c Client) error {
 65	return call(m.ProtoReq(), m, nil, c)
 66}
 67
 68// HeapProfilerCollectGarbage ...
 69type HeapProfilerCollectGarbage struct{}
 70
 71// ProtoReq name.
 72func (m HeapProfilerCollectGarbage) ProtoReq() string { return "HeapProfiler.collectGarbage" }
 73
 74// Call sends the request.
 75func (m HeapProfilerCollectGarbage) Call(c Client) error {
 76	return call(m.ProtoReq(), m, nil, c)
 77}
 78
 79// HeapProfilerDisable ...
 80type HeapProfilerDisable struct{}
 81
 82// ProtoReq name.
 83func (m HeapProfilerDisable) ProtoReq() string { return "HeapProfiler.disable" }
 84
 85// Call sends the request.
 86func (m HeapProfilerDisable) Call(c Client) error {
 87	return call(m.ProtoReq(), m, nil, c)
 88}
 89
 90// HeapProfilerEnable ...
 91type HeapProfilerEnable struct{}
 92
 93// ProtoReq name.
 94func (m HeapProfilerEnable) ProtoReq() string { return "HeapProfiler.enable" }
 95
 96// Call sends the request.
 97func (m HeapProfilerEnable) Call(c Client) error {
 98	return call(m.ProtoReq(), m, nil, c)
 99}
100
101// HeapProfilerGetHeapObjectID ...
102type HeapProfilerGetHeapObjectID struct {
103	// ObjectID Identifier of the object to get heap object id for.
104	ObjectID RuntimeRemoteObjectID `json:"objectId"`
105}
106
107// ProtoReq name.
108func (m HeapProfilerGetHeapObjectID) ProtoReq() string { return "HeapProfiler.getHeapObjectId" }
109
110// Call the request.
111func (m HeapProfilerGetHeapObjectID) Call(c Client) (*HeapProfilerGetHeapObjectIDResult, error) {
112	var res HeapProfilerGetHeapObjectIDResult
113	return &res, call(m.ProtoReq(), m, &res, c)
114}
115
116// HeapProfilerGetHeapObjectIDResult ...
117type HeapProfilerGetHeapObjectIDResult struct {
118	// HeapSnapshotObjectID Id of the heap snapshot object corresponding to the passed remote object id.
119	HeapSnapshotObjectID HeapProfilerHeapSnapshotObjectID `json:"heapSnapshotObjectId"`
120}
121
122// HeapProfilerGetObjectByHeapObjectID ...
123type HeapProfilerGetObjectByHeapObjectID struct {
124	// ObjectID ...
125	ObjectID HeapProfilerHeapSnapshotObjectID `json:"objectId"`
126
127	// ObjectGroup (optional) Symbolic group name that can be used to release multiple objects.
128	ObjectGroup string `json:"objectGroup,omitempty"`
129}
130
131// ProtoReq name.
132func (m HeapProfilerGetObjectByHeapObjectID) ProtoReq() string {
133	return "HeapProfiler.getObjectByHeapObjectId"
134}
135
136// Call the request.
137func (m HeapProfilerGetObjectByHeapObjectID) Call(c Client) (*HeapProfilerGetObjectByHeapObjectIDResult, error) {
138	var res HeapProfilerGetObjectByHeapObjectIDResult
139	return &res, call(m.ProtoReq(), m, &res, c)
140}
141
142// HeapProfilerGetObjectByHeapObjectIDResult ...
143type HeapProfilerGetObjectByHeapObjectIDResult struct {
144	// Result Evaluation result.
145	Result *RuntimeRemoteObject `json:"result"`
146}
147
148// HeapProfilerGetSamplingProfile ...
149type HeapProfilerGetSamplingProfile struct{}
150
151// ProtoReq name.
152func (m HeapProfilerGetSamplingProfile) ProtoReq() string { return "HeapProfiler.getSamplingProfile" }
153
154// Call the request.
155func (m HeapProfilerGetSamplingProfile) Call(c Client) (*HeapProfilerGetSamplingProfileResult, error) {
156	var res HeapProfilerGetSamplingProfileResult
157	return &res, call(m.ProtoReq(), m, &res, c)
158}
159
160// HeapProfilerGetSamplingProfileResult ...
161type HeapProfilerGetSamplingProfileResult struct {
162	// Profile Return the sampling profile being collected.
163	Profile *HeapProfilerSamplingHeapProfile `json:"profile"`
164}
165
166// HeapProfilerStartSampling ...
167type HeapProfilerStartSampling struct {
168	// SamplingInterval (optional) Average sample interval in bytes. Poisson distribution is used for the intervals. The
169	// default value is 32768 bytes.
170	SamplingInterval *float64 `json:"samplingInterval,omitempty"`
171
172	// IncludeObjectsCollectedByMajorGC (optional) By default, the sampling heap profiler reports only objects which are
173	// still alive when the profile is returned via getSamplingProfile or
174	// stopSampling, which is useful for determining what functions contribute
175	// the most to steady-state memory usage. This flag instructs the sampling
176	// heap profiler to also include information about objects discarded by
177	// major GC, which will show which functions cause large temporary memory
178	// usage or long GC pauses.
179	IncludeObjectsCollectedByMajorGC bool `json:"includeObjectsCollectedByMajorGC,omitempty"`
180
181	// IncludeObjectsCollectedByMinorGC (optional) By default, the sampling heap profiler reports only objects which are
182	// still alive when the profile is returned via getSamplingProfile or
183	// stopSampling, which is useful for determining what functions contribute
184	// the most to steady-state memory usage. This flag instructs the sampling
185	// heap profiler to also include information about objects discarded by
186	// minor GC, which is useful when tuning a latency-sensitive application
187	// for minimal GC activity.
188	IncludeObjectsCollectedByMinorGC bool `json:"includeObjectsCollectedByMinorGC,omitempty"`
189}
190
191// ProtoReq name.
192func (m HeapProfilerStartSampling) ProtoReq() string { return "HeapProfiler.startSampling" }
193
194// Call sends the request.
195func (m HeapProfilerStartSampling) Call(c Client) error {
196	return call(m.ProtoReq(), m, nil, c)
197}
198
199// HeapProfilerStartTrackingHeapObjects ...
200type HeapProfilerStartTrackingHeapObjects struct {
201	// TrackAllocations (optional) ...
202	TrackAllocations bool `json:"trackAllocations,omitempty"`
203}
204
205// ProtoReq name.
206func (m HeapProfilerStartTrackingHeapObjects) ProtoReq() string {
207	return "HeapProfiler.startTrackingHeapObjects"
208}
209
210// Call sends the request.
211func (m HeapProfilerStartTrackingHeapObjects) Call(c Client) error {
212	return call(m.ProtoReq(), m, nil, c)
213}
214
215// HeapProfilerStopSampling ...
216type HeapProfilerStopSampling struct{}
217
218// ProtoReq name.
219func (m HeapProfilerStopSampling) ProtoReq() string { return "HeapProfiler.stopSampling" }
220
221// Call the request.
222func (m HeapProfilerStopSampling) Call(c Client) (*HeapProfilerStopSamplingResult, error) {
223	var res HeapProfilerStopSamplingResult
224	return &res, call(m.ProtoReq(), m, &res, c)
225}
226
227// HeapProfilerStopSamplingResult ...
228type HeapProfilerStopSamplingResult struct {
229	// Profile Recorded sampling heap profile.
230	Profile *HeapProfilerSamplingHeapProfile `json:"profile"`
231}
232
233// HeapProfilerStopTrackingHeapObjects ...
234type HeapProfilerStopTrackingHeapObjects struct {
235	// ReportProgress (optional) If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken
236	// when the tracking is stopped.
237	ReportProgress bool `json:"reportProgress,omitempty"`
238
239	// TreatGlobalObjectsAsRoots (deprecated) (optional) Deprecated in favor of `exposeInternals`.
240	TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
241
242	// CaptureNumericValue (optional) If true, numerical values are included in the snapshot
243	CaptureNumericValue bool `json:"captureNumericValue,omitempty"`
244
245	// ExposeInternals (experimental) (optional) If true, exposes internals of the snapshot.
246	ExposeInternals bool `json:"exposeInternals,omitempty"`
247}
248
249// ProtoReq name.
250func (m HeapProfilerStopTrackingHeapObjects) ProtoReq() string {
251	return "HeapProfiler.stopTrackingHeapObjects"
252}
253
254// Call sends the request.
255func (m HeapProfilerStopTrackingHeapObjects) Call(c Client) error {
256	return call(m.ProtoReq(), m, nil, c)
257}
258
259// HeapProfilerTakeHeapSnapshot ...
260type HeapProfilerTakeHeapSnapshot struct {
261	// ReportProgress (optional) If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
262	ReportProgress bool `json:"reportProgress,omitempty"`
263
264	// TreatGlobalObjectsAsRoots (deprecated) (optional) If true, a raw snapshot without artificial roots will be generated.
265	// Deprecated in favor of `exposeInternals`.
266	TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
267
268	// CaptureNumericValue (optional) If true, numerical values are included in the snapshot
269	CaptureNumericValue bool `json:"captureNumericValue,omitempty"`
270
271	// ExposeInternals (experimental) (optional) If true, exposes internals of the snapshot.
272	ExposeInternals bool `json:"exposeInternals,omitempty"`
273}
274
275// ProtoReq name.
276func (m HeapProfilerTakeHeapSnapshot) ProtoReq() string { return "HeapProfiler.takeHeapSnapshot" }
277
278// Call sends the request.
279func (m HeapProfilerTakeHeapSnapshot) Call(c Client) error {
280	return call(m.ProtoReq(), m, nil, c)
281}
282
283// HeapProfilerAddHeapSnapshotChunk ...
284type HeapProfilerAddHeapSnapshotChunk struct {
285	// Chunk ...
286	Chunk string `json:"chunk"`
287}
288
289// ProtoEvent name.
290func (evt HeapProfilerAddHeapSnapshotChunk) ProtoEvent() string {
291	return "HeapProfiler.addHeapSnapshotChunk"
292}
293
294// HeapProfilerHeapStatsUpdate If heap objects tracking has been started then backend may send update for one or more fragments.
295type HeapProfilerHeapStatsUpdate struct {
296	// StatsUpdate An array of triplets. Each triplet describes a fragment. The first integer is the fragment
297	// index, the second integer is a total count of objects for the fragment, the third integer is
298	// a total size of the objects for the fragment.
299	StatsUpdate []int `json:"statsUpdate"`
300}
301
302// ProtoEvent name.
303func (evt HeapProfilerHeapStatsUpdate) ProtoEvent() string {
304	return "HeapProfiler.heapStatsUpdate"
305}
306
307// HeapProfilerLastSeenObjectID If heap objects tracking has been started then backend regularly sends a current value for last
308// seen object id and corresponding timestamp. If the were changes in the heap since last event
309// then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
310type HeapProfilerLastSeenObjectID struct {
311	// LastSeenObjectID ...
312	LastSeenObjectID int `json:"lastSeenObjectId"`
313
314	// Timestamp ...
315	Timestamp float64 `json:"timestamp"`
316}
317
318// ProtoEvent name.
319func (evt HeapProfilerLastSeenObjectID) ProtoEvent() string {
320	return "HeapProfiler.lastSeenObjectId"
321}
322
323// HeapProfilerReportHeapSnapshotProgress ...
324type HeapProfilerReportHeapSnapshotProgress struct {
325	// Done ...
326	Done int `json:"done"`
327
328	// Total ...
329	Total int `json:"total"`
330
331	// Finished (optional) ...
332	Finished bool `json:"finished,omitempty"`
333}
334
335// ProtoEvent name.
336func (evt HeapProfilerReportHeapSnapshotProgress) ProtoEvent() string {
337	return "HeapProfiler.reportHeapSnapshotProgress"
338}
339
340// HeapProfilerResetProfiles ...
341type HeapProfilerResetProfiles struct{}
342
343// ProtoEvent name.
344func (evt HeapProfilerResetProfiles) ProtoEvent() string {
345	return "HeapProfiler.resetProfiles"
346}