Class AutoStopListener.AggregatedConditionBuilder<T extends Comparable<?>>

    • Method Detail

      • every

        public AutoStopListener.AggregatedConditionBuilder<T> every​(Duration period)
        Specifies the period of time between each aggregation (min, max, etc) evaluation and reset.

        Having aggregations being evaluated and reset for every given period of time, avoids the aggregations to be "stuck" due to historical values and not focusing on the most current collected metrics. For example if in your first 10 minutes of your test plan you collected 10k requests with an average sample time of 500ms, but in the last 5 seconds you got 10 samples with an average sample time of 1 minute, you would probably like to stop test plan execution regardless of the average since the beginning of the test plan being 500ms.

        Evaluating aggregations in periods slots is particularly helpful for aggregations like AutoStopListener.TimeMetricConditionBuilder.mean(), AutoStopListener.CountMetricConditionBuilder.perSecond() and AutoStopListener.ErrorsConditionBuilder.percent().

        Parameters:
        period - specifies the period of time for aggregation evaluation and reset.

        The granularity of the period has to be seconds or greater (milliseconds are ignored).

        By default, is set to 0, which means that aggregations are evaluated for every sample and never rest.

        Returns:
        a condition builder to complete the condition definition.
      • lessThan

        public AutoStopListener.AutoStopCondition lessThan​(T value)
        Specifies to check the aggregated metric value to be less than a provided one.
        Parameters:
        value - specifies the value to check the aggregated value against.
        Returns:
        a condition builder to complete the condition definition.
      • lessThanOrEqualTo

        public AutoStopListener.AutoStopCondition lessThanOrEqualTo​(T value)
        Specifies to check the aggregated metric value to be less than or equal to a provided one.
        Parameters:
        value - specifies the value to check the aggregated value against.
        Returns:
        a condition builder to complete the condition definition.
      • greaterThan

        public AutoStopListener.AutoStopCondition greaterThan​(T value)
        Specifies to check the aggregated metric value to be greater than a provided one.
        Parameters:
        value - specifies the value to check the aggregated value against.
        Returns:
        a condition builder to complete the condition definition.
      • greaterThanOrEqualTo

        public AutoStopListener.AutoStopCondition greaterThanOrEqualTo​(T value)
        Specifies to check the aggregated metric value to be greater than or equal to a provided one.
        Parameters:
        value - specifies the value to check the aggregated value against.
        Returns:
        a condition builder to complete the condition definition.