Table of Contents

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

session IDevToolsSession

The IDevToolsSession to be used with this adapter.

Exceptions

ArgumentNullException

If session is null.

Properties

Session

Gets the DevToolsSession associated with the adapter.

public IDevToolsSession Session { get; }

Property Value

IDevToolsSession

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

command DisableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<DisableCommandResponse>

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

command EnableCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<EnableCommandResponse>

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

command GetMetricsCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<GetMetricsCommandResponse>

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

command SetTimeDomainCommandSettings
cancellationToken CancellationToken
millisecondsTimeout int?
throwExceptionIfResponseNotReceived bool

Returns

Task<SetTimeDomainCommandResponse>

Events

Metrics

Current values of the metrics.

public event EventHandler<MetricsEventArgs>? Metrics

Event Type

EventHandler<MetricsEventArgs>