HeapProfiler

class HeapProfiler(cdp: CDP) : Domain

Constructors

Link copied to clipboard
constructor(cdp: CDP)

Types

Link copied to clipboard
@Serializable
data class AddHeapSnapshotChunkParameter(val chunk: String)
Link copied to clipboard
@Serializable
data class AddInspectedHeapObjectParameter(val heapObjectId: String)
Link copied to clipboard
@Serializable
data class GetHeapObjectIdParameter(val objectId: String)
Link copied to clipboard
@Serializable
data class GetHeapObjectIdReturn(val heapSnapshotObjectId: String)
Link copied to clipboard
@Serializable
data class GetObjectByHeapObjectIdParameter(val objectId: String, val objectGroup: String? = null)
Link copied to clipboard
@Serializable
data class GetObjectByHeapObjectIdReturn(val result: Runtime.RemoteObject)
Link copied to clipboard
@Serializable
data class GetSamplingProfileReturn(val profile: HeapProfiler.SamplingHeapProfile)
Link copied to clipboard
@Serializable
data class HeapStatsUpdateParameter(val statsUpdate: List<Int>)

If heap objects tracking has been started then backend may send update for one or more fragments

Link copied to clipboard
@Serializable
data class LastSeenObjectIdParameter(val lastSeenObjectId: Int, val timestamp: Double)

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.

Link copied to clipboard
@Serializable
data class ReportHeapSnapshotProgressParameter(val done: Int, val total: Int, val finished: Boolean? = null)
Link copied to clipboard

Sampling profile.

Link copied to clipboard
@Serializable
data class SamplingHeapProfileNode(val callFrame: Runtime.CallFrame, val selfSize: Double, val id: Int, val children: List<HeapProfiler.SamplingHeapProfileNode>)

Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

Link copied to clipboard
@Serializable
data class SamplingHeapProfileSample(val size: Double, val nodeId: Int, val ordinal: Double)

A single sample from a sampling profile.

Link copied to clipboard
@Serializable
data class StartSamplingParameter(val samplingInterval: Double? = null, val includeObjectsCollectedByMajorGC: Boolean? = null, val includeObjectsCollectedByMinorGC: Boolean? = null)
Link copied to clipboard
@Serializable
data class StartTrackingHeapObjectsParameter(val trackAllocations: Boolean? = null)
Link copied to clipboard
@Serializable
data class StopSamplingReturn(val profile: HeapProfiler.SamplingHeapProfile)
Link copied to clipboard
@Serializable
data class StopTrackingHeapObjectsParameter(val reportProgress: Boolean? = null, val treatGlobalObjectsAsRoots: Boolean? = null, val captureNumericValue: Boolean? = null, val exposeInternals: Boolean? = null)
Link copied to clipboard
@Serializable
data class TakeHeapSnapshotParameter(val reportProgress: Boolean? = null, val treatGlobalObjectsAsRoots: Boolean? = null, val captureNumericValue: Boolean? = null, val exposeInternals: Boolean? = null)

Properties

Link copied to clipboard

If heap objects tracking has been started then backend may send update for one or more fragments

Link copied to clipboard

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.

Link copied to clipboard
val resetProfiles: Flow<Unit>

Functions

Link copied to clipboard
suspend fun addInspectedHeapObject(heapObjectId: String)

Enables console to refer to the node with given id via

$x (see Command Line API for more details $

x functions).

Link copied to clipboard
suspend fun collectGarbage(mode: CommandMode = CommandMode.DEFAULT)
Link copied to clipboard
suspend fun disable(mode: CommandMode = CommandMode.DEFAULT)
Link copied to clipboard
suspend fun enable(mode: CommandMode = CommandMode.DEFAULT)
Link copied to clipboard
suspend fun getSamplingProfile(mode: CommandMode = CommandMode.DEFAULT): HeapProfiler.GetSamplingProfileReturn
Link copied to clipboard
suspend fun startSampling(args: HeapProfiler.StartSamplingParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun startSampling(samplingInterval: Double? = null, includeObjectsCollectedByMajorGC: Boolean? = null, includeObjectsCollectedByMinorGC: Boolean? = null)
Link copied to clipboard
suspend fun startTrackingHeapObjects(trackAllocations: Boolean? = null)
Link copied to clipboard
suspend fun stopSampling(mode: CommandMode = CommandMode.DEFAULT): HeapProfiler.StopSamplingReturn
Link copied to clipboard
suspend fun stopTrackingHeapObjects(reportProgress: Boolean? = null, treatGlobalObjectsAsRoots: Boolean? = null, captureNumericValue: Boolean? = null, exposeInternals: Boolean? = null)
Link copied to clipboard
suspend fun takeHeapSnapshot(args: HeapProfiler.TakeHeapSnapshotParameter, mode: CommandMode = CommandMode.DEFAULT)
suspend fun takeHeapSnapshot(reportProgress: Boolean? = null, treatGlobalObjectsAsRoots: Boolean? = null, captureNumericValue: Boolean? = null, exposeInternals: Boolean? = null)