Gatling 2.0 throttle does not send any requests

I am trying to run simple Gatling scenario with throttle functionality but no requests are sent to the server.

I am using Gatling 2.0.2, Java 1.8.0_25, Maven 3.2.3 (all running on OS X)

My code looks like this:

object RequestHomePage {

def apply() = {
exec(http(“Home Page Request”)
.header(“Accept”, “application/xml,application/xhtml+xml”)

object HomePage {

val executeScenario = scenario(“Home Page Retrieval”)

class PerformaceSimulation extends Simulation {

val maxResponseTime = 5000 // milliseconds

val simultaneousUsers = atOnceUsers(100)

.throttle(jumpToRps(1), holdFor(10 seconds))

The output is the following:


I have raised the question in StackOverflow:

петък, 20 февруари 2015 г., 17:19:11 UTC, Nikolay Vasilev написа:

There’s been several bug fixes regarding throttling since 2.0.2. Please upgrade to 2.1.4.

Hi Stéphane,

I’ve updated the dependencies to

  • Gatling, 2.1.4,
  • Scala 2.11.4,
  • Gatling Maven Plugin 2.1.2,
    but there is no change in the behaviour - no requests are being sent…

Any ideas what could be the thing I am doing wrong?

Even without throttling, your scenario wouldn’t send any request as there’s a dot missing for properly chaining your scenario and your request:

val executeScenario = scenario(“Home Page Retrieval”)
MISSING DOT HERE -->exec(RequestHomePage())

This is not the issue. It was rather bad copy-pasting by my side… Sorry about that.
What I’ve reported is simplified version of the code I am actually writing (I can’t share it due to copyright restrictions). Anyway, the syntax is not a problem I think.
If I rewrite the test using feeders, and hitting the same endpoint (without throttling) all works fine. This makes me think that I am doing something wrong with the throttling.

Can you share a working reproducer, please?

Hi Stéphane,

I am afraid I can’t disclose the code I am working on as it is company’s property.

I have created simplified example:

Short info on the scenarios:

  1. Scenario “Without Throttling” - I am looping over a request for given number of times. If you want to see this example, PerformaceSimulationWithLoop should be defined as simulation class in pom.xml
  2. Scenario “With Throttling” - I am trying to use 1 user and make it do 10 invocations of a endpoint in interval of 10 seconds (hits per second: 1). The test is doing one call and the test terminates. If you want to see the example running, PerformaceSimulationThrottling should be defined as simulation class in pom.xml
    Note: You can run the simulation with: mvn clean install

The strange thing is that the throttling is working, but still not in the way I would expect it. My code at work is similar to this one and it does not request the endpoint even once.

What is the relation between the number of users and number of requests per second / duration of execution?
Is it numberOfUsers = rps * (duration seconds)? I am expecting that the users are “reused”, is that correct?

понеделник, 23 февруари 2015 г., 12:15:12 UTC, Stéphane Landelle написа:

Small remark - with regard to the throttling case, at work, RetrievePage scenario, has second feeder, which is iterating over users credentials:

Please read the documentation:

Throttle is a bottleneck. You’re still in charge of providing sufficient load on a sufficient period.

Hi Stéphane,

Many thanks about the first note on “Throttling” section.

Now it makes perfect sense and Gatling behaves as expected just using:

Hi Stephane,

I am having issues in correlation in Gatling script. I have recorded a Gatling script for Microstrategy. Like in HP LR do we have any functions to correlate dynamic values which gets generated? Please let me know.