NobesInd
NobesInd

Reputation: 97

Galting scenerio : 100 users/seconds for 10mins with a peak of 500users/seconds for every 30seconds

I want to do performance test for below scenario: 100 users/seconds for 10mins with a peak of 500users/seconds for every 30seconds

I am using throttling to achieve this

scn.inject(constantUserPersecond(100) during (10 minutes))
.throttle(reachRps(500) in (30 seconds),
  holdFor(1 sec)
)

I am not getting the expected output. As per my understanding, I should get 20 peaks in a graph per 30seconds. Am I correct or is there any other way to achieve this?

Please help, I am new to gatling

Upvotes: 0

Views: 252

Answers (2)

NobesInd
NobesInd

Reputation: 97

resolved it by following

SetUp(scn.inject(constantUserPersecond (100) during(600 seconds)), scn2.inject(nothingFor(10 seconds), splitUsers(500*20)) into atOnceUserd(500) separatedBy(30 seconds)))

Requirement was: 100users/sec for 10mins With a peak of 500users/30seconds

Upvotes: -1

Stéphane LANDELLE
Stéphane LANDELLE

Reputation: 6623

I am using throttling to achieve this

You didn't properly read the documentation.

You still have to inject users at the scenario level. Throttling tries to ensure a targeted throughput with the given scenarios and their injection profiles (number of users and duration). It’s a bottleneck, ie an upper limit. If you don’t provide enough users, you won’t reach the throttle. If your injection lasts less than the throttle, your simulation will simply stop when all the users are done. If your injection lasts longer than the throttle, the simulation will stop at the end of the throttle.

You have to configure a proper injection profile (and probably not use throttling).

The throughput your test generates depends on:

  • the injection profile =>
  • the number of requests in your scenario
  • the pauses between requests

All those are things only you can figure out depending on your use case.

Upvotes: 2

Related Questions