Class ProfilerAdapter
Represents an adapter for the Profiler domain to simplify the command interface.
public class ProfilerAdapter
- Inheritance
-
ProfilerAdapter
- Inherited Members
Constructors
ProfilerAdapter(IDevToolsSession)
Initializes a new instance of the ProfilerAdapter class.
public ProfilerAdapter(IDevToolsSession session)
Parameters
sessionIDevToolsSessionThe IDevToolsSession to be used with this adapter.
Exceptions
- ArgumentNullException
If
sessionis null.
Properties
Session
Gets the DevToolsSession associated with the adapter.
public IDevToolsSession Session { get; }
Property Value
Methods
Disable(DisableCommandSettings?, CancellationToken, int?, bool)
disable
public Task<DisableCommandResponse?> Disable(DisableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandDisableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Enable(EnableCommandSettings?, CancellationToken, int?, bool)
enable
public Task<EnableCommandResponse?> Enable(EnableCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetBestEffortCoverage(GetBestEffortCoverageCommandSettings?, CancellationToken, int?, bool)
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
public Task<GetBestEffortCoverageCommandResponse> GetBestEffortCoverage(GetBestEffortCoverageCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetBestEffortCoverageCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetSamplingInterval(SetSamplingIntervalCommandSettings, CancellationToken, int?, bool)
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
public Task<SetSamplingIntervalCommandResponse?> SetSamplingInterval(SetSamplingIntervalCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetSamplingIntervalCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Start(StartCommandSettings?, CancellationToken, int?, bool)
start
public Task<StartCommandResponse?> Start(StartCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandStartCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
StartPreciseCoverage(StartPreciseCoverageCommandSettings, CancellationToken, int?, bool)
Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
public Task<StartPreciseCoverageCommandResponse> StartPreciseCoverage(StartPreciseCoverageCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandStartPreciseCoverageCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Stop(StopCommandSettings?, CancellationToken, int?, bool)
stop
public Task<StopCommandResponse> Stop(StopCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandStopCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
StopPreciseCoverage(StopPreciseCoverageCommandSettings?, CancellationToken, int?, bool)
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
public Task<StopPreciseCoverageCommandResponse?> StopPreciseCoverage(StopPreciseCoverageCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandStopPreciseCoverageCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
TakePreciseCoverage(TakePreciseCoverageCommandSettings?, CancellationToken, int?, bool)
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
public Task<TakePreciseCoverageCommandResponse> TakePreciseCoverage(TakePreciseCoverageCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandTakePreciseCoverageCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
ConsoleProfileFinished
consoleProfileFinished
public event EventHandler<ConsoleProfileFinishedEventArgs>? ConsoleProfileFinished
Event Type
ConsoleProfileStarted
Sent when new profile recording is started using console.profile() call.
public event EventHandler<ConsoleProfileStartedEventArgs>? ConsoleProfileStarted
Event Type
PreciseCoverageDeltaUpdate
Reports coverage delta since the last poll (either from an event like this, or from
takePreciseCoverage for the current isolate. May only be sent if precise code
coverage has been started. This event can be trigged by the embedder to, for example,
trigger collection of coverage data immediately at a certain point in time.
public event EventHandler<PreciseCoverageDeltaUpdateEventArgs>? PreciseCoverageDeltaUpdate