Class PerformanceAdapter
- Namespace
- OpenQA.Selenium.DevTools.V149.Performance
- Assembly
- Selenium.WebDriver.dll
Represents an adapter for the Performance domain to simplify the command interface.
public class PerformanceAdapter
- Inheritance
-
PerformanceAdapter
- Inherited Members
Constructors
PerformanceAdapter(IDevToolsSession)
Initializes a new instance of the PerformanceAdapter class.
public PerformanceAdapter(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 collecting and reporting metrics.
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 collecting and reporting metrics.
public Task<EnableCommandResponse?> Enable(EnableCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandEnableCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
GetMetrics(GetMetricsCommandSettings?, CancellationToken, int?, bool)
Retrieve current values of run-time metrics.
public Task<GetMetricsCommandResponse> GetMetrics(GetMetricsCommandSettings? command = null, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandGetMetricsCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
SetTimeDomain(SetTimeDomainCommandSettings, CancellationToken, int?, bool)
Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.
public Task<SetTimeDomainCommandResponse?> SetTimeDomain(SetTimeDomainCommandSettings command, CancellationToken cancellationToken = default, int? millisecondsTimeout = null, bool throwExceptionIfResponseNotReceived = true)
Parameters
commandSetTimeDomainCommandSettingscancellationTokenCancellationTokenmillisecondsTimeoutint?throwExceptionIfResponseNotReceivedbool
Returns
Events
Metrics
Current values of the metrics.
public event EventHandler<MetricsEventArgs>? Metrics