Documentation
¶
Overview ¶
Package memory provides the Chrome DevTools Protocol commands, types, and events for the Memory domain.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type DOMCounter
- type GetAllTimeSamplingProfileResult
- type GetBrowserSamplingProfileResult
- type GetDOMCountersForLeakDetectionResult
- type GetDOMCountersResult
- type GetSamplingProfileResult
- type Module
- type PressureLevel
- type SamplingProfile
- type SamplingProfileNode
- type SetPressureNotificationsSuppressedParams
- type SimulatePressureNotificationParams
- type StartSamplingParams
Constants ¶
const ( CommandGetDOMCounters = "Memory.getDOMCounters" CommandGetDOMCountersForLeakDetection = "Memory.getDOMCountersForLeakDetection" CommandPrepareForLeakDetection = "Memory.prepareForLeakDetection" CommandForciblyPurgeJavaScriptMemory = "Memory.forciblyPurgeJavaScriptMemory" CommandSetPressureNotificationsSuppressed = "Memory.setPressureNotificationsSuppressed" CommandSimulatePressureNotification = "Memory.simulatePressureNotification" CommandStartSampling = "Memory.startSampling" CommandStopSampling = "Memory.stopSampling" CommandGetAllTimeSamplingProfile = "Memory.getAllTimeSamplingProfile" CommandGetBrowserSamplingProfile = "Memory.getBrowserSamplingProfile" CommandGetSamplingProfile = "Memory.getSamplingProfile" )
Command names.
Variables ¶
var ForciblyPurgeJavaScriptMemory = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandForciblyPurgeJavaScriptMemory}
ForciblyPurgeJavaScriptMemory simulate OomIntervention by purging V8 memory.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-forciblyPurgeJavaScriptMemory
var GetAllTimeSamplingProfile = cdp.Command[cdp.Empty, GetAllTimeSamplingProfileResult]{Method: CommandGetAllTimeSamplingProfile}
GetAllTimeSamplingProfile retrieve native memory allocations profile collected since renderer process startup.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getAllTimeSamplingProfile
var GetBrowserSamplingProfile = cdp.Command[cdp.Empty, GetBrowserSamplingProfileResult]{Method: CommandGetBrowserSamplingProfile}
GetBrowserSamplingProfile retrieve native memory allocations profile collected since browser process startup.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getBrowserSamplingProfile
var GetDOMCounters = cdp.Command[cdp.Empty, GetDOMCountersResult]{Method: CommandGetDOMCounters}
GetDOMCounters retruns current DOM object counters.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getDOMCounters
var GetDOMCountersForLeakDetection = cdp.Command[cdp.Empty, GetDOMCountersForLeakDetectionResult]{Method: CommandGetDOMCountersForLeakDetection}
GetDOMCountersForLeakDetection retruns DOM object counters after preparing renderer for leak detection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getDOMCountersForLeakDetection
var GetSamplingProfile = cdp.Command[cdp.Empty, GetSamplingProfileResult]{Method: CommandGetSamplingProfile}
GetSamplingProfile retrieve native memory allocations profile collected since last startSampling call.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-getSamplingProfile
var PrepareForLeakDetection = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandPrepareForLeakDetection}
PrepareForLeakDetection prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-prepareForLeakDetection
var SetPressureNotificationsSuppressed = cdp.Command[SetPressureNotificationsSuppressedParams, cdp.Empty]{Method: CommandSetPressureNotificationsSuppressed}
SetPressureNotificationsSuppressed enable/disable suppressing memory pressure notifications in all processes.
var SimulatePressureNotification = cdp.Command[SimulatePressureNotificationParams, cdp.Empty]{Method: CommandSimulatePressureNotification}
SimulatePressureNotification simulate a memory pressure notification in all processes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-simulatePressureNotification
var StartSampling = cdp.Command[StartSamplingParams, cdp.Empty]{Method: CommandStartSampling}
StartSampling start collecting native memory profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-startSampling
var StopSampling = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandStopSampling}
StopSampling stop collecting native memory profile.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-stopSampling
Functions ¶
This section is empty.
Types ¶
type DOMCounter ¶
type DOMCounter struct {
Name string `json:"name"` // Object name. Note: object names should be presumed volatile and clients should not expect the returned names to be consistent across runs.
Count int64 `json:"count"` // Object count.
}
DOMCounter DOM object counter data.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-DOMCounter
type GetAllTimeSamplingProfileResult ¶ added in v0.157.3
type GetAllTimeSamplingProfileResult struct {
Profile *SamplingProfile `json:"profile,omitempty,omitzero"`
}
GetAllTimeSamplingProfileResult is the result of the command Memory.getAllTimeSamplingProfile.
type GetBrowserSamplingProfileResult ¶ added in v0.157.3
type GetBrowserSamplingProfileResult struct {
Profile *SamplingProfile `json:"profile,omitempty,omitzero"`
}
GetBrowserSamplingProfileResult is the result of the command Memory.getBrowserSamplingProfile.
type GetDOMCountersForLeakDetectionResult ¶ added in v0.157.3
type GetDOMCountersForLeakDetectionResult struct {
Counters []*DOMCounter `json:"counters,omitempty,omitzero"` // DOM object counters.
}
GetDOMCountersForLeakDetectionResult is the result of the command Memory.getDOMCountersForLeakDetection.
type GetDOMCountersResult ¶ added in v0.157.3
type GetDOMCountersResult struct {
Documents int64 `json:"documents,omitempty,omitzero"`
Nodes int64 `json:"nodes,omitempty,omitzero"`
JsEventListeners int64 `json:"jsEventListeners,omitempty,omitzero"`
}
GetDOMCountersResult is the result of the command Memory.getDOMCounters.
type GetSamplingProfileResult ¶ added in v0.157.3
type GetSamplingProfileResult struct {
Profile *SamplingProfile `json:"profile,omitempty,omitzero"`
}
GetSamplingProfileResult is the result of the command Memory.getSamplingProfile.
type Module ¶
type Module struct {
Name string `json:"name"` // Name of the module.
UUID string `json:"uuid"` // UUID of the module.
BaseAddress string `json:"baseAddress"` // Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string.
Size float64 `json:"size"` // Size of the module in bytes.
}
Module executable module information.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-Module
type PressureLevel ¶
type PressureLevel string
PressureLevel memory pressure level.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-PressureLevel
const ( PressureLevelModerate PressureLevel = "moderate" PressureLevelCritical PressureLevel = "critical" )
PressureLevel values.
func (PressureLevel) String ¶
func (t PressureLevel) String() string
String returns the PressureLevel as string value.
type SamplingProfile ¶
type SamplingProfile struct {
Samples []*SamplingProfileNode `json:"samples"`
Modules []*Module `json:"modules"`
}
SamplingProfile array of heap profile samples.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-SamplingProfile
type SamplingProfileNode ¶
type SamplingProfileNode struct {
Size float64 `json:"size"` // Size of the sampled allocation.
Total float64 `json:"total"` // Total bytes attributed to this sample.
Stack []string `json:"stack"` // Execution stack at the point of allocation.
}
SamplingProfileNode heap profile sample.
See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#type-SamplingProfileNode
type SetPressureNotificationsSuppressedParams ¶
type SetPressureNotificationsSuppressedParams struct {
Suppressed bool `json:"suppressed"` // If true, memory pressure notifications will be suppressed.
}
SetPressureNotificationsSuppressedParams are the parameters of the command Memory.setPressureNotificationsSuppressed.
type SimulatePressureNotificationParams ¶
type SimulatePressureNotificationParams struct {
Level PressureLevel `json:"level"` // Memory pressure level of the notification.
}
SimulatePressureNotificationParams are the parameters of the command Memory.simulatePressureNotification.
type StartSamplingParams ¶
type StartSamplingParams struct {
SamplingInterval int64 `json:"samplingInterval,omitempty,omitzero"` // Average number of bytes between samples.
SuppressRandomness *bool `json:"suppressRandomness,omitempty,omitzero"` // Do not randomize intervals between samples.
}
StartSamplingParams are the parameters of the command Memory.startSampling.