-
Notifications
You must be signed in to change notification settings - Fork 222
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
Minor changes on constant-arrival-rate docs #1487
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It kinda looks like a typo (because the script above has
preAllocatedVUs: 50
), but seems to correspond to the image (see here), so I'm wondering if we should update the image accordingly 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this example got a bit mangled (probably by accident, or due to a misundersanding of the parameters) when some language was updated.
See 7943760 where this was last changed (this was way more difficult to find due to all the moves around in the last few months ... long live
-G
).In this case the example used to ... and still should probably start with less VUs then it needs to hit the arrival-rate. THis is mostly to showcase that it can add more VUs up to the maximum.
I am not certain we have many examples of this to begin with so removing those doesn't seem like a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I fully get you. I don't suggest to remove it, just to make it sure the explanation matches the script.
I'm also fine with setting
preAllocatedVUs
equals to2
. Or doespreAllocatedVUs
serve as a maximum amount and k6 starts from zero to whatever that's enough to satisfy the desired rate? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preAllocatedVUs is what it starts at - the amount it has preallocated.
And then there is a maximum settings fo
maxVUs
that is equal to the preallocated ones if missing.The commit I linked removes the max and uses only the preallocated one.
Whcih means that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k6 started with 50 and ended with 50
but the reader cannot guess that from the test definition, right? I guess it really depends on how long each iteration takes to execute, doesn't it?instead of starting with 2 and going up to 17
, but that's what the image displays, so I guess we'll need to re-generate it, right?In any case, what would you suggest as fix for this? I'm happy to correct this example and add another one, if it does worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - the definition says k6 will preallocate 50 Vus and there is no otehr maximum - so it will always will be with 50.
I would argue that we should edit the script.
My suggestion is to revert the example to start with 2 preallocatedVus and have a maximum of 50 (or w/e above 17). Touch the remaining of the text.
This keeps the example useful - showcasing that k6 can allocate Vus up to the maximum and how that looks. Instead of the current example - which doesn't showcase that.
The whole edit in the linked commit (on this example specifically) seems questionable. As it changed what the example is about from an example of how preallocated and max VUs work and how that looks, to just showcasing a "happy path" example of constant-arrival-rate and having some comments that are not illustrated IMO.
This line is also not true - or at least wasn't in the original example as k6 will not have enough VUs to hit that. So it will be some lower number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another issue or PR, I can't remember right now, had the same confusion around this script and the image.
But your explanation makes a lot of sense @mstoykov (and thanks for digging out the last changes). So it seems like we need to:
Change the paragraph after "Example" to:
"This example schedules a constant rate of 30 iterations per second for 30 seconds.
It pre-allocates 2 VUs, and allows k6 to dynamically schedule up to 50 VUs as needed."
Change this line back to mention
maxVUs
:"Having started with 2 VUs (as specified by the
preAllocatedVUs
option), k6 automatically adjusts the number of VUs to achieve the desired rate, up to themaxVUs
. For this test, this ended up as 17 VUs."Remove the last list item, "Exactly 900 iterations are started in total, 30s * 30 iters/s.".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow reply :(
Yes I think all of this will be great @heitortsergent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both @mstoykov, @heitortsergent! 🙌🏻 That makes lot of sense to me!
So, I have updated the changes accordingly.