你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

LoadTestingModelFactory.PassFailServerMetric Method

Definition

Initializes a new instance of PassFailServerMetric.

public static Azure.Developer.LoadTesting.PassFailServerMetric PassFailServerMetric(Azure.Core.ResourceIdentifier resourceId = default, string metricNamespace = default, string metricName = default, string aggregation = default, string condition = default, double value = 0, Azure.Developer.LoadTesting.PassFailAction? action = default, double? actualValue = default, Azure.Developer.LoadTesting.PassFailResult? result = default);
static member PassFailServerMetric : Azure.Core.ResourceIdentifier * string * string * string * string * double * Nullable<Azure.Developer.LoadTesting.PassFailAction> * Nullable<double> * Nullable<Azure.Developer.LoadTesting.PassFailResult> -> Azure.Developer.LoadTesting.PassFailServerMetric
Public Shared Function PassFailServerMetric (Optional resourceId As ResourceIdentifier = Nothing, Optional metricNamespace As String = Nothing, Optional metricName As String = Nothing, Optional aggregation As String = Nothing, Optional condition As String = Nothing, Optional value As Double = 0, Optional action As Nullable(Of PassFailAction) = Nothing, Optional actualValue As Nullable(Of Double) = Nothing, Optional result As Nullable(Of PassFailResult) = Nothing) As PassFailServerMetric

Parameters

resourceId
ResourceIdentifier

The resource id of the resource emitting the metric.

metricNamespace
String

The server metric namespace.

metricName
String

The server metric name.

aggregation
String

Aggregation Type.

condition
String

The comparison operator. Supported types ‘>’, ‘<’.

value
Double

The value to compare with the server metric.

action
Nullable<PassFailAction>

Action taken after the threshold is met. Default is ‘continue’.

actualValue
Nullable<Double>

The actual value of the server metric.

result
Nullable<PassFailResult>

Outcome of the test run.

Returns

A new PassFailServerMetric instance for mocking.

Applies to