Interface IProfiler
public interface IProfiler
Properties
ConsoleProfileFinished
IEventSource<ConsoleProfileFinishedEventArgs> ConsoleProfileFinished { get; }
Property Value
- IEventSource<ConsoleProfileFinishedEventArgs>
Remarks
Event args (ConsoleProfileFinishedEventArgs):
- Id
- Location - Location of console.profileEnd().
- Profile
- Title - Profile title passed as an argument to console.profile().
ConsoleProfileStarted
Sent when new profile recording is started using console.profile() call.
IEventSource<ConsoleProfileStartedEventArgs> ConsoleProfileStarted { get; }
Property Value
- IEventSource<ConsoleProfileStartedEventArgs>
Remarks
Event args (ConsoleProfileStartedEventArgs):
- Id
- Location - Location of console.profile().
- Title - Profile title passed as an argument to console.profile().
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.
[Experimental("BIDICDP001")]
IEventSource<PreciseCoverageDeltaUpdateEventArgs> PreciseCoverageDeltaUpdate { get; }
Property Value
- IEventSource<PreciseCoverageDeltaUpdateEventArgs>
Remarks
Event args (PreciseCoverageDeltaUpdateEventArgs):
- Timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
- Occasion - Identifier for distinguishing coverage events.
- Result - Coverage data for the current isolate.
Methods
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.
GetBestEffortCoverageAsync(string?, CancellationToken)
Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
Task<GetBestEffortCoverageResult> GetBestEffortCoverageAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<GetBestEffortCoverageResult>
A task representing the asynchronous operation, containing a GetBestEffortCoverageResult.
SetSamplingIntervalAsync(long, string?, CancellationToken)
Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
Task<SetSamplingIntervalResult> SetSamplingIntervalAsync(long interval, string? session = null, CancellationToken cancellationToken = default)
Parameters
intervallongNew sampling interval in microseconds.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SetSamplingIntervalResult>
A task representing the asynchronous operation, containing a SetSamplingIntervalResult.
StartAsync(string?, CancellationToken)
Task<StartResult> StartAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StartResult>
A task representing the asynchronous operation, containing a StartResult.
StartPreciseCoverageAsync(bool?, bool?, bool?, string?, CancellationToken)
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.
Task<StartPreciseCoverageResult> StartPreciseCoverageAsync(bool? callCount = null, bool? detailed = null, bool? allowTriggeredUpdates = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
callCountbool?Collect accurate call counts beyond simple 'covered' or 'not covered'.
detailedbool?Collect block-based coverage.
allowTriggeredUpdatesbool?Allow the backend to send updates on its own initiative
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StartPreciseCoverageResult>
A task representing the asynchronous operation, containing a StartPreciseCoverageResult.
StopAsync(string?, CancellationToken)
Task<StopResult> StopAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StopResult>
A task representing the asynchronous operation, containing a StopResult.
StopPreciseCoverageAsync(string?, CancellationToken)
Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
Task<StopPreciseCoverageResult> StopPreciseCoverageAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<StopPreciseCoverageResult>
A task representing the asynchronous operation, containing a StopPreciseCoverageResult.
TakePreciseCoverageAsync(string?, CancellationToken)
Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
Task<TakePreciseCoverageResult> TakePreciseCoverageAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TakePreciseCoverageResult>
A task representing the asynchronous operation, containing a TakePreciseCoverageResult.