The urls for my scenario requests are in a csv feeder file.I want to make the pause between requests configurable from a csv file as well. My goal is to have a predictable pause after each request for every simulation run.It appears I cannot have something like this evaluate properly.pause("${pause}".toLong milliseconds)Is there any other way to get the pause value from the csv file?
-Peter--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
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))