-
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
Don't panic when an execution segment is too small #1295
Comments
For an empty segment, we currently do nothing. But the goroutine spawned to track progress bar still run, with and invalid progress information passed to ProgressBar. It causes the calculation in ProgressBar.String becomes invalid due to overflow. To fix this, we only do calculation when we have a valid filled value. Fixes #1295
@mstoykov https://github.com/loadimpact/k6/pull/1304/files#r364664374 I am not sure what's masking here, it just have the same functional as before. The propose to return a message for
|
@mstoykov My concern for adding a validation to not run (well, we actually not run anything) if segment is empty:
So instead, we should fix the actually overflow in current |
@cuonglm, your current PR, with the example executor config I gave in this issue, produces something like this:
This is obviously not OK... As I mentioned in the issue:
For this run, there's no need to show any progressbar for And we should still mention it in the list of executors on top, so it's clear that k6 still knows about that execution, it just doesn't have any work to do for this particular run, with this particular execution segment. And if it's not clear enough from Regarding how this should be implemented... Maybe we need a new method in the The current method |
@na-- So will we fix bug in
Let do that. |
@na-- Seems it's better to add method to We make progress bar print started, but we can't know whether executor has works there. |
I don't understand your point, sorry. If we add this method, let's call it |
For executor which has nothing to do in a given segment, we should not include it in the list of executors. To do it, add new method HasWork to ExecutorConfig. By filtering out no work executor when creating new schedulter, we can prevents any un-necessary works and provide better UX. Fixes #1295
For executor which has nothing to do in a given segment, we should not include it in the list of executors. To do it, add new method HasWork to ExecutorConfig. By filtering out no work executor when creating new schedulter, we can prevents any un-necessary works and provide better UX. Fixes #1295
For executor which has nothing to do in a given segment, we should not include it in the list of executors. To do it, add new method HasWork to ExecutorConfig. By filtering out no work executor when creating new schedulter, we can prevents any un-necessary works and provide better UX. Fixes #1295
This fixes #1295 by not initializing any of the executors that would have no work for the particular execution segment used in the run.
Closed by #1307 ... seems like the keywords don't apply when we're not merging to |
Running something like this:
k6 run --execution-segment=2/4:3/4 -u 3 -i 3 github.com/loadimpact/k6/samples/http_get.js
Would cause the following panic:
As it's obvious by the description, we have an empty segment (0 max VUs, 0 iterations). So we should have a check somewhere that would prevent things like that - if a particular executor doesn't have any work to do with a certain execution segment, we shouldn't bother with it for the run.
It's important to note though, that when there is a small execution segment and are multiple executors, some may be without work, but others may still have to be run. For example:
The first executor can be safely ignored, but the other two have work to do.
The text was updated successfully, but these errors were encountered: