No results for

Powered byAlgolia

Per VU iterations

suggest edits

Description

Each VU executes an exact number of iterations. The total number of completed iterations will be vus * iterations.

Options

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

OptionTypeDescriptionDefault
vusintegerNumber of VUs to run concurrently.1
iterationsintegerNumber of exec function iterations to be executed by each VU.1
maxDurationstringMaximum scenario duration before it's forcibly stopped (excluding gracefulStop)."10m"

When to use

Use this executor if you need a specific amount of VUs to complete the same amount of iterations. This can be useful when you have fixed sets of test data that you want to partition between VUs.

Example

In this example, we'll let 10 VUs execute 20 iterations each, for a total of 200 iterations, with a maximum duration of 1 hour and 30 minutes.

per-vu-iters.js
1import http from 'k6/http';
3export let options = {
4 discardResponseBodies: true,
5 scenarios: {
6 contacts: {
7 executor: 'per-vu-iterations',
8 vus: 10,
9 iterations: 20,
10 maxDuration: '1h30m',
11 },
12 },
13};
15export default function () {
16 http.get('https://test.k6.io/contacts.php');
17}