Documentation
¶
Overview ¶
Package heapprofiler provides the Chrome DevTools Protocol commands, types, and events for the HeapProfiler domain.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type AddInspectedHeapObjectParams
- type EventAddHeapSnapshotChunk
- type EventHeapStatsUpdate
- type EventLastSeenObjectID
- type EventReportHeapSnapshotProgress
- type EventResetProfiles
- type GetHeapObjectIDParams
- type GetHeapObjectIDResult
- type GetObjectByHeapObjectIDParams
- type GetObjectByHeapObjectIDResult
- type GetSamplingProfileResult
- type HeapSnapshotObjectID
- type SamplingHeapProfile
- type SamplingHeapProfileNode
- type SamplingHeapProfileSample
- type StartSamplingParams
- type StartTrackingHeapObjectsParams
- type StopSamplingResult
- type StopTrackingHeapObjectsParams
- type TakeHeapSnapshotParams
Constants ¶
const ( CommandAddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject" CommandCollectGarbage = "HeapProfiler.collectGarbage" CommandDisable = "HeapProfiler.disable" CommandEnable = "HeapProfiler.enable" CommandGetHeapObjectID = "HeapProfiler.getHeapObjectId" CommandGetObjectByHeapObjectID = "HeapProfiler.getObjectByHeapObjectId" CommandGetSamplingProfile = "HeapProfiler.getSamplingProfile" CommandStartSampling = "HeapProfiler.startSampling" CommandStartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects" CommandStopSampling = "HeapProfiler.stopSampling" CommandStopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects" CommandTakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot" )
Command names.
Variables ¶
var AddHeapSnapshotChunk = cdp.Event[EventAddHeapSnapshotChunk]{Method: "HeapProfiler.addHeapSnapshotChunk"}
AddHeapSnapshotChunk [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-addHeapSnapshotChunk
var AddInspectedHeapObject = cdp.Command[AddInspectedHeapObjectParams, cdp.Empty]{Method: CommandAddInspectedHeapObject}
AddInspectedHeapObject enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-addInspectedHeapObject
var CollectGarbage = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandCollectGarbage}
CollectGarbage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-collectGarbage
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-disable
var Enable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandEnable}
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-enable
var GetHeapObjectID = cdp.Command[GetHeapObjectIDParams, GetHeapObjectIDResult]{Method: CommandGetHeapObjectID}
GetHeapObjectID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getHeapObjectId
var GetObjectByHeapObjectID = cdp.Command[GetObjectByHeapObjectIDParams, GetObjectByHeapObjectIDResult]{Method: CommandGetObjectByHeapObjectID}
GetObjectByHeapObjectID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getObjectByHeapObjectId
var GetSamplingProfile = cdp.Command[cdp.Empty, GetSamplingProfileResult]{Method: CommandGetSamplingProfile}
GetSamplingProfile [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getSamplingProfile
var HeapStatsUpdate = cdp.Event[EventHeapStatsUpdate]{Method: "HeapProfiler.heapStatsUpdate"}
HeapStatsUpdate if heap objects tracking has been started then backend may send update for one or more fragments.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-heapStatsUpdate
var LastSeenObjectID = cdp.Event[EventLastSeenObjectID]{Method: "HeapProfiler.lastSeenObjectId"}
LastSeenObjectID 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.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-lastSeenObjectId
var ReportHeapSnapshotProgress = cdp.Event[EventReportHeapSnapshotProgress]{Method: "HeapProfiler.reportHeapSnapshotProgress"}
ReportHeapSnapshotProgress [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-reportHeapSnapshotProgress
var ResetProfiles = cdp.Event[EventResetProfiles]{Method: "HeapProfiler.resetProfiles"}
ResetProfiles [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-resetProfiles
var StartSampling = cdp.Command[StartSamplingParams, cdp.Empty]{Method: CommandStartSampling}
StartSampling [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startSampling
var StartTrackingHeapObjects = cdp.Command[StartTrackingHeapObjectsParams, cdp.Empty]{Method: CommandStartTrackingHeapObjects}
StartTrackingHeapObjects [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startTrackingHeapObjects
var StopSampling = cdp.Command[cdp.Empty, StopSamplingResult]{Method: CommandStopSampling}
StopSampling [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopSampling
var StopTrackingHeapObjects = cdp.Command[StopTrackingHeapObjectsParams, cdp.Empty]{Method: CommandStopTrackingHeapObjects}
StopTrackingHeapObjects [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopTrackingHeapObjects
var TakeHeapSnapshot = cdp.Command[TakeHeapSnapshotParams, cdp.Empty]{Method: CommandTakeHeapSnapshot}
TakeHeapSnapshot [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-takeHeapSnapshot
Functions ¶
This section is empty.
Types ¶
type AddInspectedHeapObjectParams ¶
type AddInspectedHeapObjectParams struct {
HeapObjectID HeapSnapshotObjectID `json:"heapObjectId"` // Heap snapshot object id to be accessible by means of $x command line API.
}
AddInspectedHeapObjectParams are the parameters of the command HeapProfiler.addInspectedHeapObject.
type EventAddHeapSnapshotChunk ¶
type EventAddHeapSnapshotChunk struct {
Chunk string `json:"chunk"`
}
EventAddHeapSnapshotChunk [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-addHeapSnapshotChunk
type EventHeapStatsUpdate ¶
type EventHeapStatsUpdate struct {
StatsUpdate []int64 `json:"statsUpdate"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
}
EventHeapStatsUpdate if heap objects tracking has been started then backend may send update for one or more fragments.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-heapStatsUpdate
type EventLastSeenObjectID ¶
type EventLastSeenObjectID struct {
LastSeenObjectID int64 `json:"lastSeenObjectId"`
Timestamp float64 `json:"timestamp"`
}
EventLastSeenObjectID 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.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-lastSeenObjectId
type EventReportHeapSnapshotProgress ¶
type EventReportHeapSnapshotProgress struct {
Done int64 `json:"done"`
Total int64 `json:"total"`
Finished bool `json:"finished"`
}
EventReportHeapSnapshotProgress [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-reportHeapSnapshotProgress
type EventResetProfiles ¶
type EventResetProfiles struct{}
EventResetProfiles [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#event-resetProfiles
type GetHeapObjectIDParams ¶
type GetHeapObjectIDParams struct {
ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to get heap object id for.
}
GetHeapObjectIDParams are the parameters of the command HeapProfiler.getHeapObjectId.
type GetHeapObjectIDResult ¶ added in v0.157.3
type GetHeapObjectIDResult struct {
HeapSnapshotObjectID HeapSnapshotObjectID `json:"heapSnapshotObjectId,omitempty,omitzero"` // Id of the heap snapshot object corresponding to the passed remote object id.
}
GetHeapObjectIDResult is the result of the command HeapProfiler.getHeapObjectId.
type GetObjectByHeapObjectIDParams ¶
type GetObjectByHeapObjectIDParams struct {
ObjectID HeapSnapshotObjectID `json:"objectId"`
ObjectGroup string `json:"objectGroup,omitempty,omitzero"` // Symbolic group name that can be used to release multiple objects.
}
GetObjectByHeapObjectIDParams are the parameters of the command HeapProfiler.getObjectByHeapObjectId.
type GetObjectByHeapObjectIDResult ¶ added in v0.157.3
type GetObjectByHeapObjectIDResult struct {
Result *runtime.RemoteObject `json:"result,omitempty,omitzero"` // Evaluation result.
}
GetObjectByHeapObjectIDResult is the result of the command HeapProfiler.getObjectByHeapObjectId.
type GetSamplingProfileResult ¶ added in v0.157.3
type GetSamplingProfileResult struct {
Profile *SamplingHeapProfile `json:"profile,omitempty,omitzero"` // Return the sampling profile being collected.
}
GetSamplingProfileResult is the result of the command HeapProfiler.getSamplingProfile.
type HeapSnapshotObjectID ¶
type HeapSnapshotObjectID string
HeapSnapshotObjectID heap snapshot object id.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-HeapSnapshotObjectId
func (HeapSnapshotObjectID) String ¶
func (t HeapSnapshotObjectID) String() string
String returns the HeapSnapshotObjectID as string value.
type SamplingHeapProfile ¶
type SamplingHeapProfile struct {
Head *SamplingHeapProfileNode `json:"head"`
Samples []*SamplingHeapProfileSample `json:"samples"`
}
SamplingHeapProfile sampling profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfile
type SamplingHeapProfileNode ¶
type SamplingHeapProfileNode struct {
CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
SelfSize float64 `json:"selfSize"` // Allocations size in bytes for the node excluding children.
ID int64 `json:"id"` // Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
Children []*SamplingHeapProfileNode `json:"children"` // Child nodes.
}
SamplingHeapProfileNode sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfileNode
type SamplingHeapProfileSample ¶
type SamplingHeapProfileSample struct {
Size float64 `json:"size"` // Allocation size in bytes attributed to the sample.
NodeID int64 `json:"nodeId"` // Id of the corresponding profile tree node.
Ordinal float64 `json:"ordinal"` // Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
}
SamplingHeapProfileSample a single sample from a sampling profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#type-SamplingHeapProfileSample
type StartSamplingParams ¶
type StartSamplingParams struct {
SamplingInterval float64 `json:"samplingInterval,omitempty,omitzero"` // Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
StackDepth float64 `json:"stackDepth,omitempty,omitzero"` // Maximum stack depth. The default value is 128.
IncludeObjectsCollectedByMajorGC *bool `json:"includeObjectsCollectedByMajorGC,omitempty,omitzero"` // 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.
IncludeObjectsCollectedByMinorGC *bool `json:"includeObjectsCollectedByMinorGC,omitempty,omitzero"` // 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.
}
StartSamplingParams are the parameters of the command HeapProfiler.startSampling.
type StartTrackingHeapObjectsParams ¶
type StartTrackingHeapObjectsParams struct {
TrackAllocations *bool `json:"trackAllocations,omitempty,omitzero"`
}
StartTrackingHeapObjectsParams are the parameters of the command HeapProfiler.startTrackingHeapObjects.
type StopSamplingResult ¶ added in v0.157.3
type StopSamplingResult struct {
Profile *SamplingHeapProfile `json:"profile,omitempty,omitzero"` // Recorded sampling heap profile.
}
StopSamplingResult is the result of the command HeapProfiler.stopSampling.
type StopTrackingHeapObjectsParams ¶
type StopTrackingHeapObjectsParams struct {
ReportProgress *bool `json:"reportProgress,omitempty,omitzero"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
CaptureNumericValue *bool `json:"captureNumericValue,omitempty,omitzero"` // If true, numerical values are included in the snapshot
ExposeInternals *bool `json:"exposeInternals,omitempty,omitzero"` // If true, exposes internals of the snapshot.
}
StopTrackingHeapObjectsParams are the parameters of the command HeapProfiler.stopTrackingHeapObjects.
type TakeHeapSnapshotParams ¶
type TakeHeapSnapshotParams struct {
ReportProgress *bool `json:"reportProgress,omitempty,omitzero"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
CaptureNumericValue *bool `json:"captureNumericValue,omitempty,omitzero"` // If true, numerical values are included in the snapshot
ExposeInternals *bool `json:"exposeInternals,omitempty,omitzero"` // If true, exposes internals of the snapshot.
}
TakeHeapSnapshotParams are the parameters of the command HeapProfiler.takeHeapSnapshot.