Skip to content

Timer

This task "wraps" a group of other tasks, that might not have any requests and hence no statistics, to measure how long time they took. Request content length for this task in the scenario is number of tasks between starting and stopping the timer.

Odd executions of this task starts the timer by setting a timestamp for the task. Even executions of this task stops the timer and logs the "response time" in the locust statistics.

Step implementations

Statistics

Executions of this task will be visible in locust statistics with request type TIMR. name will be prefixed with (<n>), where <n> indicates how many tasks was run between the start and stop of this timer. Response time is the total time it took for the <n> tasks to run.

Arguments

  • name str - name of the timer