-
Hi! While working on integration BlazeMeter's WeightedSwitchController to dsl, I've also realised that there is no analogs for Gatling's And I've implement it too :) But then I've understood that in fact they have basically same logic:
Finally, they are really close to be the same. So, I'd like to you estimate both and choose what is better for dsl, may be they deserve to exist together :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello, I don't see in your implementation of randomSwitch the actual import for RandomSwitchController class. Is this jmeter RandomController, or is it WeightedSwitchController with "Random Choice" option selected, or is it some other controller implementation? I think, that if you implement WeightedSwitchController, you might want to consider adding to it a Now, considering that, jmeter RandomController would be similar to weightedSwitchController with random choice and all elements with same weight (or no weight). Ie: //in this scenario we are not using add(double, ThreadGroupChild) since there is no need to set weights in children.
weightedSwitchController()
.randomSelection(true)
.children(
httpSampler("https://myservice"),
httpSampler("https://myservice/users")
) But, I think that for brevity, and avoiding some confusion that may rise with previous case, would be nice to have a shortcut, that is easily identifiable by jmeter users like: randomSwitchController(
httpSampler("https://myservice"),
httpSampler("https://myservice/users")
) Does this answer your question? What are your thoughts? In any case, I would advise you to do a PR for one, and then another for the other one if you plan to implement both. |
Beta Was this translation helpful? Give feedback.
Hello,
I don't see in your implementation of randomSwitch the actual import for RandomSwitchController class. Is this jmeter RandomController, or is it WeightedSwitchController with "Random Choice" option selected, or is it some other controller implementation?
I think, that if you implement WeightedSwitchController, you might want to consider adding to it a
randomSelection
method to allow for setting the "Random Choice" option.Now, considering that, jmeter RandomController would be similar to weightedSwitchController with random choice and all elements with same weight (or no weight). Ie:
//in this scenario we are not using add(double, ThreadGroupChild) since there is no need to set wei…