How to use Pause (normalPausesWithPercentageDuration) in gatling?

I want to use normalPausesWithPercentageDuration where do I declare it and use it in my gatling script. Any examples how to use it will be more helpful? Thank you.

import scala.concurrent.duration._
import io.gatling.core.Predef._
import io.gatling.http.Predef._

class temp extends Simulation {

    val httpProtocol = http
        .baseURL(testServerUrl)

    val scn = scenario("Test data")
        .feed(csvFeeder)
        .exec(http("My Request")
            .get("""/api/xyz/${ID}""")
            )

        .normalPausesWithPercentageDuration(2) // This is not working

    setUp(scn.inject(constantUsersPerSec(userCount) during(duration minutes))).protocols(httpProtocol)

}   

Hi Peter,

I stumbled about your question today when I was investigating same issue. I guess you already solved it somehow.

So for future readers:

At the moment ScenarioSetup class does not have method normalPausesWithPercentageDuration, but you can pass your pause type through pauses method as shown below.

setUp(

).pauses(normalPausesWithPercentageDuration(0.30))

Dne čtvrtek 27. července 2017 14:46:59 UTC+2 Peter napsal(a):