Amir Mehler
Amir Mehler

Reputation: 4680

I want the index of each user in Gatling rampUsers

I have scenario I will run 10K times, and I would like each call to be different.

  1. How do I write a feeder that will simply return the numbers from 1 to 10000? (i'm very new to scala)

  2. Is there a way I can get some sort of index from rampUsers?

Upvotes: 0

Views: 756

Answers (1)

Mykola Gurov
Mykola Gurov

Reputation: 8705

Something like this could do:

  def newSequence():Iterator[Map[String,String]] = {
    val seq: Iterator[Int] = Iterator.from(1)
    Iterator.continually(Map("id" -> seq.next()))
  }    

....

.feed(newSequence())

Upvotes: 1

Related Questions