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

Specifying both duration and iterations is deprecated and won't be supported in the future k6 versions #1058

Closed
arswaroop opened this issue Jun 25, 2019 · 1 comment · Fixed by #1057
Labels

Comments

@arswaroop
Copy link

Hello,
I am getting such warnings if i put arguments for iterations, users or duration. Can i know what will it be in future iterations, I didn't find any docs about this change on the website.

@na--
Copy link
Member

na-- commented Jun 26, 2019

@arswaroop, that warning may be a bit premature and unnecessary, but it was added in k6 because we plan to make some major improvements (and, unfortunately, some breaking changes) to the way k6 execution and scheduling of VUs work. You can find more details in the following WIP pull request, but in short, in the k6 version following the next one, the execution will be a lot more flexible and feature-rich.

The basic idea is that the current iterations, duration and stages options will still be usable - they will just act as shortcut options for the new schedulers/executors. So if you use iterations, you'd get the shared-iterations executor, and if you use duration, you'd get constant-looping-vus, etc.

The breaking changes stem from the way k6 currently supports multiple different conflicting options. It is somewhat buggy and so those warnings were added in k6 v0.24.0 to prepare users for the breaking changes. For example, it makes no sense to specify both duration and stages, but k6 currently doesn't forbid it...

But I think I was actually overzealous in removing support for simultaneously using the iterations and duration shortcut options... Those two shortcuts could co-exist without issues, and the shared-iterations executor from that PR actually supports them. k6 run --iterations 10 --duration 20s --vus 5 would produce something like this:

export let options = {
  execution: {
    default: {
      type: "shared-iterations",
      vus: 5,
      iterations: 10,
      maxDuration: "20s",
    }
  }
};

I'll remove this specific warning as part of #1057 (so it gets released with k6 v0.25.0 in the next week or so), and I'll make the change to #1007 as well, so it gets in the actual new executors.

na-- added a commit that referenced this issue Jun 27, 2019
This would just produce a shared-iterations scheduler with the specified number of iterations and a maxDuration equal to the passed duration, similar to how it works in the current k6 execution. This should fix #1058.
na-- added a commit that referenced this issue Jun 27, 2019
This would just produce a shared-iterations scheduler with the specified number of iterations and a maxDuration equal to the passed duration, similar to how it works in the current k6 execution. This should fix #1058.
na-- added a commit that referenced this issue Jun 28, 2019
This would just produce a shared-iterations scheduler with the specified number of iterations and a maxDuration equal to the passed duration, similar to how it works in the current k6 execution. This should fix #1058.
@na-- na-- mentioned this issue Jul 12, 2019
39 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants