HeapProfilerApi class

Constructors

HeapProfilerApi(Client _client)

Properties

hashCode int
The hash code for this object.
no setterinherited
onAddHeapSnapshotChunk Stream<String>
no setter
onHeapStatsUpdate Stream<List<int>>
If heap objects tracking has been started then backend may send update for one or more fragments
no setter
onLastSeenObjectId Stream<LastSeenObjectIdEvent>
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.
no setter
onReportHeapSnapshotProgress Stream<ReportHeapSnapshotProgressEvent>
no setter
onResetProfiles Stream<void>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addInspectedHeapObject(HeapSnapshotObjectId heapObjectId) Future<void>
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). heapObjectId Heap snapshot object id to be accessible by means of $x command line API.
collectGarbage() Future<void>
disable() Future<void>
enable() Future<void>
getHeapObjectId(RemoteObjectId objectId) Future<HeapSnapshotObjectId>
objectId Identifier of the object to get heap object id for. Returns: Id of the heap snapshot object corresponding to the passed remote object id.
getObjectByHeapObjectId(HeapSnapshotObjectId objectId, {String? objectGroup}) Future<RemoteObject>
objectGroup Symbolic group name that can be used to release multiple objects. Returns: Evaluation result.
getSamplingProfile() Future<SamplingHeapProfile>
Returns: Return the sampling profile being collected.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startSampling({num? samplingInterval, bool? includeObjectsCollectedByMajorGC, bool? includeObjectsCollectedByMinorGC}) Future<void>
samplingInterval Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. includeObjectsCollectedByMajorGC 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 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.
startTrackingHeapObjects({bool? trackAllocations}) Future<void>
stopSampling() Future<SamplingHeapProfile>
Returns: Recorded sampling heap profile.
stopTrackingHeapObjects({bool? reportProgress, bool? treatGlobalObjectsAsRoots, bool? captureNumericValue, bool? exposeInternals}) Future<void>
reportProgress If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. captureNumericValue If true, numerical values are included in the snapshot exposeInternals If true, exposes internals of the snapshot.
takeHeapSnapshot({bool? reportProgress, bool? treatGlobalObjectsAsRoots, bool? captureNumericValue, bool? exposeInternals}) Future<void>
reportProgress If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. captureNumericValue If true, numerical values are included in the snapshot exposeInternals If true, exposes internals of the snapshot.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited