constantUsersPerSec(100) during(1 min)
constantUsersPerSec(200) during(1 min)
constantUsersPerSec(300) during(1 min)object RESTrequest {
val 1Feeder = ssv("file1.ssv").circular
val 2Feeder = ssv("file2.ssv").circular
val 3Feeder = ssv("file3.ssv").circular
val headers_10 = Map( "Content-Type" -> """application/json""",
"Accept-Charset" -> """ISO-8859-1,utf-8;q=0.7,*;q=0.7""",
"Keep-Alive" -> """115""",
"Connection" -> """keep-alive""",
"X-Requested-With" -> """XMLHttpRequest"""
)
val initiateC2C = feed(1Feeder)
.feed(2Feeder)
.feed(3Feeder)
.exec(http("Post")
.post("/callback/${username}")
.basicAuth("${username}", "${password}")
.headers(headers_10)
.body(StringBody("""{"var1":"${calling}","var2":"${called}"}""")).asJSON
)
}
val scn = scenario("TestScenario").exec(RESTrequest.initiateC2C)
setUp(scn).throttle(jumpToRps(2), holdFor(10 seconds)).protocols(httpConf)
//or perhaps
setUp(scn.inject(atOnceUsers(2000)).throttle(jumpToRps(2), holdFor(10 seconds)).protocols(httpConf))
--
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/d/optout.
val scn_sleep_closed = scenario("scn_sleep") .exec(forever(){req_sleep} )
.inject(constantUsersPerSec(1) during(3 seconds) )
which worked for me.
Unless your system has 3 users/requests arriving at exactly the same time, and there is a component in the real system that is not in the SUT(system under test) that throttles those requests to 1rps, then the above may read and work better.
clearly there's a defect there somewhere so it should continue to be followed up with Stéphane

--