Interface IHeapProfiler
- Namespace
- Selenium.WebDriver.BiDi.Cdp.HeapProfiler
- Assembly
- Selenium.WebDriver.BiDi.Cdp.dll
[Experimental("BIDICDP001")]
public interface IHeapProfiler
Properties
AddHeapSnapshotChunk
IEventSource<AddHeapSnapshotChunkEventArgs> AddHeapSnapshotChunk { get; }
Property Value
- IEventSource<AddHeapSnapshotChunkEventArgs>
Remarks
Event args (AddHeapSnapshotChunkEventArgs):
- Chunk
HeapStatsUpdate
If heap objects tracking has been started then backend may send update for one or more fragments
IEventSource<HeapStatsUpdateEventArgs> HeapStatsUpdate { get; }
Property Value
- IEventSource<HeapStatsUpdateEventArgs>
Remarks
Event args (HeapStatsUpdateEventArgs):
- 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.
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.
IEventSource<LastSeenObjectIdEventArgs> LastSeenObjectId { get; }
Property Value
- IEventSource<LastSeenObjectIdEventArgs>
Remarks
Event args (LastSeenObjectIdEventArgs):
- LastSeenObjectId
- Timestamp
ReportHeapSnapshotProgress
IEventSource<ReportHeapSnapshotProgressEventArgs> ReportHeapSnapshotProgress { get; }
Property Value
- IEventSource<ReportHeapSnapshotProgressEventArgs>
Remarks
Event args (ReportHeapSnapshotProgressEventArgs):
- Done
- Total
- Finished
ResetProfiles
IEventSource<ResetProfilesEventArgs> ResetProfiles { get; }
Property Value
- IEventSource<ResetProfilesEventArgs>
Methods
AddInspectedHeapObjectAsync(HeapSnapshotObjectId, string?, CancellationToken)
Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
Task<AddInspectedHeapObjectResult> AddInspectedHeapObjectAsync(HeapSnapshotObjectId heapObjectId, string? session = null, CancellationToken cancellationToken = default)
Parameters
heapObjectIdHeapSnapshotObjectIdHeap snapshot object id to be accessible by means of $x command line API.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<AddInspectedHeapObjectResult>
A task representing the asynchronous operation, containing a AddInspectedHeapObjectResult.
CollectGarbageAsync(string?, CancellationToken)
Task<CollectGarbageResult> CollectGarbageAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<CollectGarbageResult>
A task representing the asynchronous operation, containing a CollectGarbageResult.
DisableAsync(string?, CancellationToken)
Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DisableResult>
A task representing the asynchronous operation, containing a DisableResult.
EnableAsync(string?, CancellationToken)
Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<EnableResult>
A task representing the asynchronous operation, containing a EnableResult.
GetHeapObjectIdAsync(RemoteObjectId, string?, CancellationToken)
Task<GetHeapObjectIdResult> GetHeapObjectIdAsync(RemoteObjectId objectId, string? session = null, CancellationToken cancellationToken = default)
Parameters
objectIdRemoteObjectIdIdentifier of the object to get heap object id for.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetHeapObjectIdResult>
A task representing the asynchronous operation, containing a GetHeapObjectIdResult.
GetObjectByHeapObjectIdAsync(HeapSnapshotObjectId, string?, string?, CancellationToken)
Task<GetObjectByHeapObjectIdResult> GetObjectByHeapObjectIdAsync(HeapSnapshotObjectId objectId, string? objectGroup = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
objectIdHeapSnapshotObjectIdobjectGroupstringSymbolic group name that can be used to release multiple objects.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetObjectByHeapObjectIdResult>
A task representing the asynchronous operation, containing a GetObjectByHeapObjectIdResult.
GetSamplingProfileAsync(string?, CancellationToken)
Task<GetSamplingProfileResult> GetSamplingProfileAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetSamplingProfileResult>
A task representing the asynchronous operation, containing a GetSamplingProfileResult.
StartSamplingAsync(double?, double?, bool?, bool?, string?, CancellationToken)
Task<StartSamplingResult> StartSamplingAsync(double? samplingInterval = null, double? stackDepth = null, bool? includeObjectsCollectedByMajorGC = null, bool? includeObjectsCollectedByMinorGC = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
samplingIntervaldouble?Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
stackDepthdouble?Maximum stack depth. The default value is 128.
includeObjectsCollectedByMajorGCbool?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.
includeObjectsCollectedByMinorGCbool?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.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StartSamplingResult>
A task representing the asynchronous operation, containing a StartSamplingResult.
StartTrackingHeapObjectsAsync(bool?, string?, CancellationToken)
Task<StartTrackingHeapObjectsResult> StartTrackingHeapObjectsAsync(bool? trackAllocations = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
trackAllocationsbool?sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StartTrackingHeapObjectsResult>
A task representing the asynchronous operation, containing a StartTrackingHeapObjectsResult.
StopSamplingAsync(string?, CancellationToken)
Task<StopSamplingResult> StopSamplingAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StopSamplingResult>
A task representing the asynchronous operation, containing a StopSamplingResult.
StopTrackingHeapObjectsAsync(bool?, bool?, bool?, bool?, string?, CancellationToken)
Task<StopTrackingHeapObjectsResult> StopTrackingHeapObjectsAsync(bool? reportProgress = null, bool? treatGlobalObjectsAsRoots = null, bool? captureNumericValue = null, bool? exposeInternals = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
reportProgressbool?If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
treatGlobalObjectsAsRootsbool?Deprecated in favor of exposeInternals.
captureNumericValuebool?If true, numerical values are included in the snapshot
exposeInternalsbool?If true, exposes internals of the snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StopTrackingHeapObjectsResult>
A task representing the asynchronous operation, containing a StopTrackingHeapObjectsResult.
TakeHeapSnapshotAsync(bool?, bool?, bool?, bool?, string?, CancellationToken)
Task<TakeHeapSnapshotResult> TakeHeapSnapshotAsync(bool? reportProgress = null, bool? treatGlobalObjectsAsRoots = null, bool? captureNumericValue = null, bool? exposeInternals = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
reportProgressbool?If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
treatGlobalObjectsAsRootsbool?If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of exposeInternals.
captureNumericValuebool?If true, numerical values are included in the snapshot
exposeInternalsbool?If true, exposes internals of the snapshot.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TakeHeapSnapshotResult>
A task representing the asynchronous operation, containing a TakeHeapSnapshotResult.