Hi,
I have a fairly simple setUp
and several different simulations placed in different Scala files. In inject methods for scripts, the number of users and duration are specified as a terminal argument.
The question is whether there is any way to get the number of scenarios that we have passed to setUp
in order to divide crmUsers
by their number.
I want to do this because I have the same crmUsers
for all simulations, but some of them have more scenarios, while others have fewer, so that in the end there would be the same load distribution across different sections
Or somehow through the methods, my ChainBuilder methods are collected in the same file into an object that is then called in the script, their number is the same as the number of scenarios used in setUp
An example of what I want to do:
crmUsers = crmUsers / 3 - I want to replace this with some functional method, not a hardcode value
setUp(
appDiscountsScenario.inject(
rampPerSec(crmUsers, crmDuration),
const(crmDuration),
rampPerSecReverse(crmUsers, crmDuration)
),
appInvoiceScenario.inject(
rampPerSec(crmUsers, crmDuration),
const(crmDuration),
rampPerSecReverse(crmUsers, crmDuration)
),
appServiceAccountsScenario.inject(
rampPerSec(crmUsers, crmDuration),
const(crmDuration),
rampPerSecReverse(crmUsers, crmDuration)
)
)
Thanks in advance for your reply
Gatling 3.8.0; Scala