Description
A variable number of VUs execute as many iterations as possible for a specified amount of time. This executor is equivalent to the global stages option.
Options
In addition to the common configuration options this executor also adds the following options:
Option | Type | Description | Default |
---|---|---|---|
stages(required) | array | Array of objects that specify the target number of VUs to ramp up or down to. | [] |
startVUs | integer | Number of VUs to run at test start. | 1 |
gracefulRampDown | string | Time to wait for an already started iteration to finish before stopping it during a ramp down. | "30s" |
When to use
This executor is a good fit if you need VUs to ramp up or down during specific periods of time.
Example
In this example, we'll run a two-stage test, ramping up from 0 to 100 VUs for 5 seconds, and down to 0 VUs over 5 seconds.
ramping-vus.js
Note the setting of gracefulRampDown to 0 seconds, which could cause some iterations to be interrupted during the ramp down stage.