Throttle not working as expected

Hi, I am trying to reach a specific TPS with given number os users which I am able to successfully reach with Jmeter but didn’t get it to achieve similar functionality in Gatling. I am sure I must be missing something here, so please advise!

`
package computerdatabase

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._

class Eligibility extends Simulation {

val httpProtocol = http
.baseUrl(“https://abc.com”) // Here is the root for all relative URLs

val header = Map(
“Content-Type” → “application/soap+xml;charset=UTF-8”,
“Connection” → “alive”,
“User-agent” → “Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)

val data1 = csv(“elig_latest_3mon.csv”).circular
val data2 = csv(“elig_pre_3mon.csv”).circular

val pl1 = scenario(“Eligility_pre_3mon”).feed(data2).exec(http(“Eligility_pre_3mon”)
.post("/xyz123.asmx")
.headers(header)
.body(ElFileBody(“eligibility.txt”)))

val pl2 = scenario(“Eligility_latest_3mon”).feed(data1).exec(http(“Eligility_latest_3mon”)
.post("/aaaabbbb.asmx")
.headers(header)
.body(ElFileBody(“eligibility.txt”)))

//Desired number of TPS so that overall I can achieve around 301560 = 27000 txns in 15 minutes but my execution is showing only 1000 target txns
setUp(
pl1.inject(rampUsers(1000) during (15 minutes)))
.throttle(
reachRps(30) in (10 seconds),
holdFor(15 minutes)
)
.protocols(httpProtocol)
}
`

Any inputs from anyone?? I would really appreciate if you could share some insight on what’s missing in my code.

Thanks,
Vikram

Have you tried setting the ramp users to 27000?

Throttling can only limit throughput, it does not add any requests to attain the desired limit if throughput is less than the limit:

Blue line: the actual throughput of the scenario if there were no limitations, i.e., no throttling.
Red line: a combination of throttling’s DSL elements to limit the throughput of the scenario.
Blue hatch: actual throughput after applying throttling.

You can see that everything that is under the throughput is “lost”. You’ll need to make sure you provide enough throughput in your scenario and injection profile to begin with:

Thanks a lot! Clearly, my understanding of throttling wasn’t correct but now after your pictorial representation, it’s crystal clear:-)

Vikram