public static class AutoStopListener.AutoStopCondition extends Object
| Modifier and Type | Method and Description |
|---|---|
static AutoStopListener.TimeMetricConditionBuilder |
connectionTime()
Specifies to create a condition that evaluates connection time (time it takes to establish a
connection with the service under test).
|
static AutoStopListener.ErrorsConditionBuilder |
errors()
Specifies to create a condition that evaluates the number of not successful samples.
|
AutoStopListener.AutoStopCondition |
holdsFor(Duration duration)
Specifies for how long the specified condition has to hold (be met) before the test plan
execution is stopped.
|
static AutoStopListener.TimeMetricConditionBuilder |
latencyTime()
Specifies to create a condition that evaluates latency time (time between last request byte
is sent to service under test and first response byte is received).
|
static AutoStopListener.CountMetricConditionBuilder |
receivedBytes()
Specifies to create a condition that evaluates the number bytes (response bytes) received
from the service under test.
|
static AutoStopListener.CountMetricConditionBuilder |
samples()
Specifies to create a condition that evaluates the number of samples.
|
static AutoStopListener.AutoStopConditionBuilder |
samplesMatching(String regex)
Specifies a regular expression used to filter samples for which the condition will be
evaluated.
|
static AutoStopListener.TimeMetricConditionBuilder |
sampleTime()
Specifies to create a condition that evaluates sample time (time between last request byte is
sent to service under test and last response byte is received).
|
static AutoStopListener.CountMetricConditionBuilder |
sentBytes()
Specifies to create a condition that evaluates the number bytes sent (request bytes) to the
service under test.
|
public static AutoStopListener.AutoStopConditionBuilder samplesMatching(String regex)
When the condition defines a regular expression, then the one specified in the autoStop listener is ignored.
This is handy in case you want to define a condition that apply only to a sub set of samples that share a common label structure. Eg: to samplers with same name but in different parts of test plan (e.g.: under different ifControllers).
For targeting a single sampler or all the samplers contained within a controller or thread group, prefer just placing the autoStop listener in the correct scope of the test plan.
regex - specifies the regular expression to filter samples.public static AutoStopListener.TimeMetricConditionBuilder sampleTime()
public static AutoStopListener.TimeMetricConditionBuilder latencyTime()
public static AutoStopListener.TimeMetricConditionBuilder connectionTime()
public static AutoStopListener.CountMetricConditionBuilder samples()
public static AutoStopListener.ErrorsConditionBuilder errors()
public static AutoStopListener.CountMetricConditionBuilder sentBytes()
public static AutoStopListener.CountMetricConditionBuilder receivedBytes()
public AutoStopListener.AutoStopCondition holdsFor(Duration duration)
This is useful to avoid potential short temporal conditions that may need to be ignored.
duration - specifies the duration to wait the condition to hold before stopping test
plan execution.
The granularity of the period has to be seconds or greater (milliseconds are ignored).
By default, it is set to 0, which means that it will stop test plan as soon as the condition is met.
Copyright © 2024. All rights reserved.