Gatling 3.0.1.1 - how to make a CSV feeder read all data before starting the simulation?

Hi all,

I’m upgrading my Gatling simulations from 2.3.0 to 3.0.1.1. In one of my simulations I’m using a large CSV file with 10 million records like this:

  • val myFeed = csv(“data/file_with_10000000_records.csv”).random

This is working fine with Gatling 2.3.0 - there is a short delay before the simulation is started, i.e. where the data is being loaded, but then the simulation runs fine.

After upgrading to 3.0.1.1 this changed: now the simulation starts immediately, but no requests are sent for a minute or so while the data is being loaded.

So my question is: how do I force the feeder to read all records before starting the simulation?

I know there is a new batch feature, but I want to randomize over the whole set, not over sub-batches. I tried to use ‘batch’ with a batch size of 10 million,
but then again the simulation starts without sending any requests for a minute or so.

I’m also aware of the ‘readRecords’ method, which forces the loading of all the records, but that transforms the results into a Seq, not a Feeder.
Not sure if I can transform that back into a feeder with random record selection.

Any help would be appreciated, many thanks!

Regards,
-Danny

PS - the migration guide does not mention that the behavior of the feeder changed

Hi,

Unless you use “batch”, Data is still fully loaded in memory when we build the scenario components, hence before the simulation actually starts.
If you really think you’ve found an issue, please provide a reproducer.

Cheers,

Hi Stéphane,

Thanks for the quick response! You’re right, I misinterpreted the output. What happens is when I use Gatling 2.3.0 the actual test immediately (i.e. after a few seconds) starts, producing an output like this:

[Gatling 2.3.0:]

Simulation jpmcperf.JPMCPerf started…

I don’t mind that it takes longer before the test starts, but if you think it’s an issue I can provide you a reproducible script.

Yes, please do.
We’ve changed csv parser, so it might be an issue with the new one.

Thanks,

Stéphane Landelle

GatlingCorp CTO
slandelle@gatling.io