-
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
arrival-rate distribution bugs #1299
Comments
After much thought and even more relearning of the basics of calculus (mostly through this youtube series). I came up with a math-based solution for how we calculate when an iteration should happen during the ramp-up or ramp-down, which also works for the non-ramp parts but is not required :D. This is based on one of the original reasons for developing calculus and calculating the integral of a function. If we have iteration per second - And "obviously"(don't tell my math teacher I've used this) if we increase the number rectangles we get closer and closer to the actual area under the graph of the function. And this informally is called integral, which calculus can help us calculate ... accurately :) Now for the actual application, we have in k6 .. we don't care about every possible function (although we can implement many more in the future) we care about a linear function that has value The linear function Note: maybe I will reedit this in the future to use ... different letters as it gets a little confusing with the big and small letters. Now then ... we need to find the We mostly care about the one where if All variables A,B,t,d are positive If A<B (ramp-up): If A>B (ramp-down) Because everything is positive the only way to get a negative number is for to be negative, but this means that should be bigger than on the other hand we will prove that can't be true: # divide by but A similar method can be used to do another ramp-up/downs or even to simulate sinusoidal traffic for example. But I propose exploring this after this has been implemented, tried and proven to work well :D. I will be posting PR soon with this after I figure out how to better split the work with execution segments. |
Hmm after thinking that the integral is an overkill and attempting to arrive at the same solution geometrically (since, after all, we're dealing with simple rectangles and triangles), I now view the integral, if there are no mistakes in your calculations, as the simpler approach... 😅 Maybe I missed an optimization somewhere, or maybe it's because of the extra constant I added [1], but I ended up with a nastier quadratic equation at the end... In any case, and regardless of the exact mathematical details that are used, I can see how the approach of having a function However:
|
I wrote up on an idea/proposal how to fix point 3 from above, how to independently and evenly distribute arrival-rate iterations across instances: #997 (comment) |
closed by #1285 |
This comment describes how execution segments don't work correctly with the arrival-rate executors: #1007 (comment)
And the other known bug is specifically with the variable-arrival-rate executor, described and somewhat fixed in #1285 and demonstrated in this screencast: https://asciinema.org/a/xZca9sVUpmFfqBU0IFVCPRYZO
The text was updated successfully, but these errors were encountered: