Class DslCounter

    • Constructor Detail

      • DslCounter

        public DslCounter​(String varName)
    • Method Detail

      • startingValue

        public DslCounter startingValue​(long start)
        Allows specifying the starting value of the counter.
        Parameters:
        start - specifies the value to start the counter with. When not specified, 0 will be used.
        Returns:
        the counter for further configuration and usage.
      • startingValue

        public DslCounter startingValue​(String start)
        Same as startingValue(long) but allowing to use JMeter expressions for starting value.

        This method allows to extract the initial value of the counter for example from a JMeter property (eg: ${__P(COUNT_INIT)}).

        Parameters:
        start - specifies a jmeter expression evaluating to a number that specifies the initial value for the counter.
        Returns:
        the counter for further configuration and usage.
      • increment

        public DslCounter increment​(long inc)
        Specifies how much the counter will increase in each iteration.
        Parameters:
        inc - specifies how much to increase the counter in each iteration. By default, 1.
        Returns:
        the counter for further configuration and usage.
        Since:
        1.22
      • maximumValue

        public DslCounter maximumValue​(long max)
        Specifies the maximum value of the counter.

        When the value exceeds this value, the counter is reset to its starting value.

        Parameters:
        max - specifies the maximum value to use. When not specified, Long.MAX_VALUE is used.
        Returns:
        the counter for further configuration and usage.
        Since:
        1.22
      • perThread

        public DslCounter perThread​(boolean perThread)
        Specifies to use a separate counter for each thread.
        Parameters:
        perThread - specifies to use a separate counter for each thread. When not specified, then the counter is shared, and incremented, by all thread group threads. By default, it is set to false.
        Returns:
        the counter for further configuration and usage.
        Since:
        1.22