Hi Peter,
Sadly, pauses are not currently dynamic.
Can you open an issue, please?
Cheers,
Stéphane
Hi Peter,
Sadly, pauses are not currently dynamic.
Can you open an issue, please?
Cheers,
Stéphane
Hi,
This point is now discussed in the following pull-request : https://github.com/excilys/gatling/pull/979
cheers
Nicolas
Is it operational?
I’m trying to define the pause through a value in my feeder but I always have [ERROR] i.g.c.a.Pause - ‘pause-2’ failed to execute
I tried to type the value as String, Int, Long or Duration but I always have this error.
Is my code wrong or is there an issue elsewhere?
with some code
val records = customSeparatorFeeder.records
val fmt = ISODateTimeFormat.dateTime()
val feeder = records.sliding(2).map { case Seq(line1, line2) =>
// println(s"record $line1")
val t1 = line1.apply("timestamp")
val t2 = line2.apply("timestamp")
val dt1 = fmt.parseDateTime(t1)
val dt2 = fmt.parseDateTime(t2)
val diff = Math.abs(dt2.getMillis - dt1.getMillis)
// println(s"diff t2 $t2 - t1 $t1 = $diff")
val url = line1.apply("request").split(' ').get(1).substring(prodSite.length)
// println(url)
val r = Map("pause" -> (diff milliseconds), "url" -> url, "module" -> url.split('/').head)
print(s"$r")
r
}
val scn = scenario("test") // A scenario is a chain of requests and pauses
.repeat(10, "n") {
feed(feeder)
.exec(http("${module}")
.get("${url}"))
.pause("${pause}")
}
setUp(scn.inject(atOnceUsers(1)).protocols(httpConf))