-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update the README and repo wiki after v0.27.0 #1556
Comments
Piggybacking on this, there is a line in the Readme that states: These scenarios can run both sequentially and in parallel . I would be quite interested in how is sequential execution of scenarios controlled, as I assumed a configuration switch but am not finding it in the codebase. Thank you! Edit: I am assuming the idea is not to control it with startTime. |
@bbsbb, at the moment, import http from 'k6/http';
import { sleep } from 'k6';
export let options = {
scenarios: {
stages_up_down: {
executor: "ramping-vus",
startVUs: 0,
stages: [
{ duration: "10s", target: 20 },
{ duration: "10s", target: 0 },
],
gracefulRampDown: "10s",
gracefulStop: "10s", // this also has to be taken into account
exec: 'webtest',
},
stages_down_up: {
executor: "ramping-vus",
startVUs: 20,
stages: [
{ duration: "10s", target: 0 },
{ duration: "10s", target: 20 },
],
gracefulRampDown: "10s",
gracefulStop: "10s",
exec: 'webtest',
startTime: "30s", // this is the important part, 2nd sequential scenario
},
api_test: {
executor: 'constant-arrival-rate',
rate: 3,
timeUnit: '1s',
duration: '30s',
preAllocatedVUs: 20,
exec: 'apitest',
startTime: "60s", // 3rd sequential scenario
},
},
};
export function webtest() {
http.get('https://test.k6.io/');
sleep(Math.random() * 5);
}
export function apitest() {
http.get(`https://test-api.k6.io/`);
} Notice how the
We have some plans to add a |
Our scenarios are generated so this was easy to implement. Still, I do believe that sequential execution mode for scenarios as a control switch would be a good addition. Will consider if I can write a good justification for it in a separate issue, but off the top of my head, with some executor types parallel would be almost undesirable. Edit: I will actually see if I can contribute my thoughts to #1342 |
Can we also drop the On a related note, I DO think that the README is overly long and probably most of it should go in the docs and just to have links from the README as well |
Is this issue still open |
It is, though keep in mind that it might not be suitable for people who are new to k6, it requires some fairly in-depth knowledge of how executors and scenarios work in k6... |
There are probably quite a few things that need updates after https://github.com/loadimpact/k6/releases/tag/v0.27.0
The text was updated successfully, but these errors were encountered: