I use a CSV-based feeder to parametrize the users injected (user ids, passwords, etc.). However, I have the constraint that I shall instantiate every user only once. This means that I have to inject as many users as there are valid records in the CSV-file (i.e., the feeder is exhausted). Of course I can hardcode the number but I do not want to have this dependency between the feeding file and the actual simulation implementation.
Is there any solution for that?
If you use a CSV feeder (it also works for the JDBC feeder), you can get the size of your feeder :
val myFeeder = csv("foo") val recordsCount = myFeeder.records.size
And then use recordsCount in your injection profile
Thanks a lot. Work’s like a charm. I wasn’t aware that the file is read at once so that I can access the number of lines when starting the simulation
Whenever possible, Gatilng reads data for your feeders at once, so that I/O operations needed to get your data don’t slow down your simulation.