Execute all entries of feeder exactly once following a ramp or constant rate per sec

I have a json file where each entry corresponds to a user id. N entries.
I wrote a scenario that perform a certain series of step for one user.
Now, I’d like to inject each user defined in the json/feeder exactly once in the scenario using rampUsers or constantUsersPerSec or similar capability.
Should I just hard code N in the rampUsers call? Is there a better way?

In code:


val users = jsonFile(“users.json”) // containers N user entries
val N = 1000 // hardcode N? better way?

val scn = scenario(“MyScenario”)
.feed(users) // pop a user. puts the “uid” in the session
.exec(DoSomethingForOneUser.class) // users the uid

rampUsers(N) over (1 minute) // ramp exactly N users over 1 minute


Note: I could call users.records.size but that does an entire copy of the feeder just to get me its size so that isn’t very efficient…