PassFailMetric Class

  • java.lang.Object
    • com.azure.developer.loadtesting.models.PassFailMetric

Implements

public final class PassFailMetric
implements JsonSerializable<PassFailMetric>

Pass fail metric.

Constructor Summary

Constructor Description
PassFailMetric()

Creates an instance of PassFailMetric class.

Method Summary

Modifier and Type Method and Description
static PassFailMetric fromJson(JsonReader jsonReader)

Reads an instance of PassFailMetric from the JsonReader.

PassFailAction getAction()

Get the action property: Action taken after the threshold is met.

Double getActualValue()

Get the actualValue property: The actual value of the client metric for the test run.

PassFailAggregationFunction getAggregate()

Get the aggregate property: The aggregation function to be applied on the client metric.

PfMetrics getClientMetric()

Get the clientMetric property: The client metric on which the criteria should be applied.

String getCondition()

Get the condition property: The comparison operator.

String getRequestName()

Get the requestName property: Request name for which the Pass fail criteria has to be applied.

PassFailResult getResult()

Get the result property: Outcome of the test run.

Double getValue()

Get the value property: The value to compare with the client metric.

PassFailMetric setAction(PassFailAction action)

Set the action property: Action taken after the threshold is met.

PassFailMetric setAggregate(PassFailAggregationFunction aggregate)

Set the aggregate property: The aggregation function to be applied on the client metric.

PassFailMetric setClientMetric(PfMetrics clientMetric)

Set the clientMetric property: The client metric on which the criteria should be applied.

PassFailMetric setCondition(String condition)

Set the condition property: The comparison operator.

PassFailMetric setRequestName(String requestName)

Set the requestName property: Request name for which the Pass fail criteria has to be applied.

PassFailMetric setValue(Double value)

Set the value property: The value to compare with the client metric.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

PassFailMetric

public PassFailMetric()

Creates an instance of PassFailMetric class.

Method Details

fromJson

public static PassFailMetric fromJson(JsonReader jsonReader)

Reads an instance of PassFailMetric from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PassFailMetric if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the PassFailMetric.

getAction

public PassFailAction getAction()

Get the action property: Action taken after the threshold is met. Default is ‘continue’.

Returns:

the action value.

getActualValue

public Double getActualValue()

Get the actualValue property: The actual value of the client metric for the test run.

Returns:

the actualValue value.

getAggregate

public PassFailAggregationFunction getAggregate()

Get the aggregate property: 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.

Returns:

the aggregate value.

getClientMetric

public PfMetrics getClientMetric()

Get the clientMetric property: The client metric on which the criteria should be applied.

Returns:

the clientMetric value.

getCondition

public String getCondition()

Get the condition property: The comparison operator. Supported types ‘>’, ‘<’.

Returns:

the condition value.

getRequestName

public String getRequestName()

Get the requestName property: Request name for which the Pass fail criteria has to be applied.

Returns:

the requestName value.

getResult

public PassFailResult getResult()

Get the result property: Outcome of the test run.

Returns:

the result value.

getValue

public Double getValue()

Get the value property: 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.

Returns:

the value value.

setAction

public PassFailMetric setAction(PassFailAction action)

Set the action property: Action taken after the threshold is met. Default is ‘continue’.

Parameters:

action - the action value to set.

Returns:

the PassFailMetric object itself.

setAggregate

public PassFailMetric setAggregate(PassFailAggregationFunction aggregate)

Set the aggregate property: 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.

Parameters:

aggregate - the aggregate value to set.

Returns:

the PassFailMetric object itself.

setClientMetric

public PassFailMetric setClientMetric(PfMetrics clientMetric)

Set the clientMetric property: The client metric on which the criteria should be applied.

Parameters:

clientMetric - the clientMetric value to set.

Returns:

the PassFailMetric object itself.

setCondition

public PassFailMetric setCondition(String condition)

Set the condition property: The comparison operator. Supported types ‘>’, ‘<’.

Parameters:

condition - the condition value to set.

Returns:

the PassFailMetric object itself.

setRequestName

public PassFailMetric setRequestName(String requestName)

Set the requestName property: Request name for which the Pass fail criteria has to be applied.

Parameters:

requestName - the requestName value to set.

Returns:

the PassFailMetric object itself.

setValue

public PassFailMetric setValue(Double value)

Set the value property: 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.

Parameters:

value - the value value to set.

Returns:

the PassFailMetric object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to