I can't seem to find anyway to get context into the transaction function.
It would be nice to have some kind of context for the Scenario,Transaction and User.
To explain my problem:
I want to load test an API, to make the request the API takes some parameters that can't be generated, but need to be picked from a pool of options. This pool is about 200k lines in a csv but it is problematic to open the file in every transaction, especially when it would end up with multiple hundred/thausand open files on the system so it would be nice to give the scenario the pool or each user an option etc.
There's a variety of methods you could use. For your specific use-case, you may want to explore setting a OnceCell prior to invoking GooseAttack::initialize which you can then read within specific transactions when needed.
You could also a session if you need per-user customizations.
Is there some way to give the user Context?
I can't seem to find anyway to get context into the transaction function. It would be nice to have some kind of context for the Scenario,Transaction and User.
To explain my problem: I want to load test an API, to make the request the API takes some parameters that can't be generated, but need to be picked from a pool of options. This pool is about 200k lines in a csv but it is problematic to open the file in every transaction, especially when it would end up with multiple hundred/thausand open files on the system so it would be nice to give the scenario the pool or each user an option etc.