Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iterations does not work when vus is set #378

Closed
ppcano opened this issue Nov 26, 2017 · 1 comment
Closed

iterations does not work when vus is set #378

ppcano opened this issue Nov 26, 2017 · 1 comment

Comments

@ppcano
Copy link
Contributor

ppcano commented Nov 26, 2017

When iterations and vus are set, k6 will only run 1 iteration per vu. It looks like a bug, but not sure if this is the expected behavior.

import http from "k6/http";
import { sleep } from "k6";

export let options = {
  vus: 10,
  iterations: 10
};


export default function() {
  http.get("http://test.loadimpact.com");
  console.log(`VU: ${__VU}  -  ITER: ${__ITER}`);
  sleep(1);
};
@ppcano
Copy link
Contributor Author

ppcano commented Nov 26, 2017

Closing the issue, iterations refers to the total number of iterations. The total iterations will be split between all the VUs.

If we want 10 iterations for each VU.

const vus = 10,
      iterations = 10;

export let options = {
  vus: vus,
  iterations: vus*iterations
};

@ppcano ppcano closed this as completed Nov 26, 2017
@na-- na-- mentioned this issue May 15, 2019
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant