Hi
I am trying to use throttling but I cannot understand the difference with “holdFor” and “jumpToRps”
This is my simulation:
class TestThrottle extends Simulation {
object RESTrequest {
val initiateRequest = exec(http("Get")
.get("/")
)
}
val httpConf = http
.baseURL("http://www.falabella.com/falabella-cl") // Here is the root for all relative URLs
.silentResources
.inferHtmlResources(BlackList(""".*\.js""", """.*\.css""", """.*\.gif""", """.*\.jpeg""", """.*\.jpg""", """.*\.ico""", """.*\.woff""", """.*\.(t|o)tf""", """.*\.png""", """.*\.svg"""), WhiteList())
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8") // Here are the common headers
.acceptEncodingHeader("gzip, deflate")
.acceptLanguageHeader("en-US,en;q=0.5")
.userAgentHeader("Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0")
//Now, we can write the scenario as a composition
val scn = scenario("Scenario Name").exec(RESTrequest.initiateRequest)
setUp(scn.inject(atOnceUsers(3))).throttle(jumpToRps(10), holdFor(100 seconds)).protocols(httpConf)
}
I tested 3 times:
- setUp(scn.inject(atOnceUsers(3))).throttle(jumpToRps(1), holdFor(10 seconds)).protocols(httpConf). As you can see in the screenshot the duration is 2 seconds and the number of user 2.
- setUp(scn.inject(atOnceUsers(3))).throttle(jumpToRps(1), holdFor(100 seconds)).protocols(httpConf). The same here, 2 sec and 2 users
- setUp(scn.inject(atOnceUsers(3))).throttle(jumpToRps(10), holdFor(100 seconds)).protocols(httpConf). Here there was 3 request 3 users for 1 second.
I don’t see any difference in the time and the number of request.
I am using gatling-charts-highcharts-bundle-2.2.5