Interface IMemory
[Experimental("BIDICDP001")]
public interface IMemory
Methods
ForciblyPurgeJavaScriptMemoryAsync(string?, CancellationToken)
Simulate OomIntervention by purging V8 memory.
Task<ForciblyPurgeJavaScriptMemoryResult> ForciblyPurgeJavaScriptMemoryAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ForciblyPurgeJavaScriptMemoryResult>
A task representing the asynchronous operation, containing a ForciblyPurgeJavaScriptMemoryResult.
GetAllTimeSamplingProfileAsync(string?, CancellationToken)
Retrieve native memory allocations profile collected since renderer process startup.
Task<GetAllTimeSamplingProfileResult> GetAllTimeSamplingProfileAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetAllTimeSamplingProfileResult>
A task representing the asynchronous operation, containing a GetAllTimeSamplingProfileResult.
GetBrowserSamplingProfileAsync(string?, CancellationToken)
Retrieve native memory allocations profile collected since browser process startup.
Task<GetBrowserSamplingProfileResult> GetBrowserSamplingProfileAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetBrowserSamplingProfileResult>
A task representing the asynchronous operation, containing a GetBrowserSamplingProfileResult.
GetDOMCountersAsync(string?, CancellationToken)
Retruns current DOM object counters.
Task<GetDOMCountersResult> GetDOMCountersAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetDOMCountersResult>
A task representing the asynchronous operation, containing a GetDOMCountersResult.
GetDOMCountersForLeakDetectionAsync(string?, CancellationToken)
Retruns DOM object counters after preparing renderer for leak detection.
Task<GetDOMCountersForLeakDetectionResult> GetDOMCountersForLeakDetectionAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetDOMCountersForLeakDetectionResult>
A task representing the asynchronous operation, containing a GetDOMCountersForLeakDetectionResult.
GetSamplingProfileAsync(string?, CancellationToken)
Retrieve native memory allocations profile collected since last startSampling call.
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.
PrepareForLeakDetectionAsync(string?, CancellationToken)
Prepares for leak detection by terminating workers, stopping spellcheckers, dropping non-essential internal caches, running garbage collections, etc.
Task<PrepareForLeakDetectionResult> PrepareForLeakDetectionAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<PrepareForLeakDetectionResult>
A task representing the asynchronous operation, containing a PrepareForLeakDetectionResult.
SetPressureNotificationsSuppressedAsync(bool, string?, CancellationToken)
Enable/disable suppressing memory pressure notifications in all processes.
Task<SetPressureNotificationsSuppressedResult> SetPressureNotificationsSuppressedAsync(bool suppressed, string? session = null, CancellationToken cancellationToken = default)
Parameters
suppressedboolIf true, memory pressure notifications will be suppressed.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SetPressureNotificationsSuppressedResult>
A task representing the asynchronous operation, containing a SetPressureNotificationsSuppressedResult.
SimulatePressureNotificationAsync(PressureLevel, string?, CancellationToken)
Simulate a memory pressure notification in all processes.
Task<SimulatePressureNotificationResult> SimulatePressureNotificationAsync(PressureLevel level, string? session = null, CancellationToken cancellationToken = default)
Parameters
levelPressureLevelMemory pressure level of the notification.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SimulatePressureNotificationResult>
A task representing the asynchronous operation, containing a SimulatePressureNotificationResult.
StartSamplingAsync(long?, bool?, string?, CancellationToken)
Start collecting native memory profile.
Task<StartSamplingResult> StartSamplingAsync(long? samplingInterval = null, bool? suppressRandomness = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
samplingIntervallong?Average number of bytes between samples.
suppressRandomnessbool?Do not randomize intervals between samples.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StartSamplingResult>
A task representing the asynchronous operation, containing a StartSamplingResult.
StopSamplingAsync(string?, CancellationToken)
Stop collecting native memory profile.
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.