Memory

class Memory(cdp: CDP) : Domain

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class DOMCounter(val name: String, val count: Int)

DOM object counter data.

Link copied to clipboard
@Serializable
data class GetAllTimeSamplingProfileReturn(val profile: Memory.SamplingProfile)
Link copied to clipboard
@Serializable
data class GetBrowserSamplingProfileReturn(val profile: Memory.SamplingProfile)
Link copied to clipboard
@Serializable
data class GetDOMCountersForLeakDetectionReturn(val counters: List<Memory.DOMCounter>)
Link copied to clipboard
@Serializable
data class GetDOMCountersReturn(val documents: Int, val nodes: Int, val jsEventListeners: Int)
Link copied to clipboard
@Serializable
data class GetSamplingProfileReturn(val profile: Memory.SamplingProfile)
Link copied to clipboard
@Serializable
data class Module(val name: String, val uuid: String, val baseAddress: String, val size: Double)

Executable module information

Link copied to clipboard

Memory pressure level.

Link copied to clipboard
@Serializable
data class SamplingProfile(val samples: List<Memory.SamplingProfileNode>, val modules: List<Memory.Module>)

Array of heap profile samples.

Link copied to clipboard
@Serializable
data class SamplingProfileNode(val size: Double, val total: Double, val stack: List<String>)

Heap profile sample.

@Serializable
data class SetPressureNotificationsSuppressedParameter(val suppressed: Boolean)
Link copied to clipboard
Link copied to clipboard
@Serializable
data class StartSamplingParameter(val samplingInterval: Int? = null, val suppressRandomness: Boolean? = null)

Functions

Link copied to clipboard
suspend fun forciblyPurgeJavaScriptMemory(mode: CommandMode = CommandMode.DEFAULT)

Simulate OomIntervention by purging V8 memory.

Link copied to clipboard

Retrieve native memory allocations profile collected since renderer process startup.

Link copied to clipboard

Retrieve native memory allocations profile collected since browser process startup.

Link copied to clipboard
suspend fun getDOMCounters(mode: CommandMode = CommandMode.DEFAULT): Memory.GetDOMCountersReturn

Retruns current DOM object counters.

Link copied to clipboard

Retruns DOM object counters after preparing renderer for leak detection.

Link copied to clipboard
suspend fun getSamplingProfile(mode: CommandMode = CommandMode.DEFAULT): Memory.GetSamplingProfileReturn

Retrieve native memory allocations profile collected since last startSampling call.

Link copied to clipboard
suspend fun prepareForLeakDetection(mode: CommandMode = CommandMode.DEFAULT)

Prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.

Link copied to clipboard

Enable/disable suppressing memory pressure notifications in all processes.

Link copied to clipboard

Simulate a memory pressure notification in all processes.

Link copied to clipboard
suspend fun startSampling(args: Memory.StartSamplingParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun startSampling(samplingInterval: Int? = null, suppressRandomness: Boolean? = null)

Start collecting native memory profile.

Link copied to clipboard
suspend fun stopSampling(mode: CommandMode = CommandMode.DEFAULT)

Stop collecting native memory profile.