k6-docs
k6-docs copied to clipboard
Further explain vusActive vs vusInitialized in the docs
As reported in the community slack, the docs https://k6.io/docs/javascript-api/k6-execution/#instance don't specify the difference between vusActive and vusInitialized. It would be good to add an explanation.
If you have a scenario with 10 VUs and a ramp-up duration of 10 seconds, then at the beginning of the test,
vusInitializedwill be 10 andvusActivewill be 0. After 5 seconds,vusActivewill be 5 andvusInitializedwill still be 10. After 10 seconds, bothvusActiveandvusInitializedwill be 10
In the end, this example describes it quite well already: https://k6.io/docs/using-k6/scenarios/executors/constant-arrival-rate/
Unfortunately, the Observation part is out of sync, wrong number of vus.
But as test can run on more than one instance. Isn't possible that the number of vusInitialized can be smaller to the total amount, as it could be split over two instances?
I didn't use cloud version at all. But that's what I am reading from the explanation.
So the explanation should be, that vusInitialized are the ready/waiting vus per instance, if the test runs on 1 instance it would be 10, if it run on two, it can be split?
I think the Constant arrival rate page definitely helps, but it'd still be helpful to have something in the execution page.
As far as the explanation on the Constant arrival rate, I think it doesn't mention vusInitialized, but my guess is that number would be 50 since that's what's set on the example script. But as the test runs, it only needs up to 17 VUs to reach the iteration rate, and that would be the vusActive value at that point in time.