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

LoadTestingModelFactory.PassFailMetric Method

Definition

Initializes a new instance of PassFailMetric.

public static Azure.Developer.LoadTesting.PassFailMetric PassFailMetric(Azure.Developer.LoadTesting.PfMetrics? clientMetric = default, Azure.Developer.LoadTesting.PassFailAggregationFunction? aggregate = default, string condition = default, string requestName = default, double? value = default, Azure.Developer.LoadTesting.PassFailAction? action = default, double? actualValue = default, Azure.Developer.LoadTesting.PassFailResult? result = default);
static member PassFailMetric : Nullable<Azure.Developer.LoadTesting.PfMetrics> * Nullable<Azure.Developer.LoadTesting.PassFailAggregationFunction> * string * string * Nullable<double> * Nullable<Azure.Developer.LoadTesting.PassFailAction> * Nullable<double> * Nullable<Azure.Developer.LoadTesting.PassFailResult> -> Azure.Developer.LoadTesting.PassFailMetric
Public Shared Function PassFailMetric (Optional clientMetric As Nullable(Of PfMetrics) = Nothing, Optional aggregate As Nullable(Of PassFailAggregationFunction) = Nothing, Optional condition As String = Nothing, Optional requestName As String = Nothing, Optional value As Nullable(Of Double) = Nothing, Optional action As Nullable(Of PassFailAction) = Nothing, Optional actualValue As Nullable(Of Double) = Nothing, Optional result As Nullable(Of PassFailResult) = Nothing) As PassFailMetric

Parameters

clientMetric
Nullable<PfMetrics>

The client metric on which the criteria should be applied.

aggregate
Nullable<PassFailAggregationFunction>

The aggregation function to be applied on the client metric. Allowed functions

  • ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests
condition
String

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

requestName
String

Request name for which the Pass fail criteria has to be applied.

value
Nullable<Double>

The value to compare with the client metric. Allowed values - ‘error : [0.0 , 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms.

action
Nullable<PassFailAction>

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

actualValue
Nullable<Double>

The actual value of the client metric for the test run.

result
Nullable<PassFailResult>

Outcome of the test run.

Returns

A new PassFailMetric instance for mocking.

Applies to