No results for

Powered byAlgolia

Ramping arrival rate

suggest edits


A variable number of iterations are executed in a specified period of time. This is similar to the ramping VUs executor, but for iterations instead, and k6 will attempt to dynamically change the number of VUs to achieve the configured iteration rate.

See the arrival rate section for details.


In addition to the common configuration options this executor also adds the following options:

stages(required)arrayArray of objects that specify the target number of iterations to ramp up or down to.[]
preAllocatedVUs(required)integerNumber of VUs to pre-allocate before test start in order to preserve runtime resources.-
startRateintegerNumber of iterations to execute each timeUnit period at test start.0
timeUnitstringPeriod of time to apply the startRate the stages target value."1s"
maxVUsintegerMaximum number of VUs to allow during the test run.-

When to use

If you need your tests to not be affected by the system-under-test's performance, and would like to ramp the number of iterations up or down during specific periods of time.


In this example, we'll execute a variable RPS test, starting at 50, ramping up to 200 and then back to 0, over a period of 1 minute.

1import http from 'k6/http';
3export const options = {
4 discardResponseBodies: true,
5 scenarios: {
6 contacts: {
7 executor: 'ramping-arrival-rate',
8 startRate: 50,
9 timeUnit: '1s',
10 preAllocatedVUs: 50,
11 maxVUs: 100,
12 stages: [
13 { target: 200, duration: '30s' },
14 { target: 0, duration: '30s' },
15 ],
16 },
17 },
20export default function () {
21 http.get('');