Search code examples
javascalagatlingscala-gatling

Find the API limit by response time


Is there a way with Gatling to find the limit in terms of users/request per seconds where the target API response time is deteriorating ?

I have to develop a load test with Gatling. My Target API guaranteed response time less than 50 ms for a charge of X concurrent request. But i'd like to find the limit where the response time will be greater than 50ms. In order to rise a risk when the volume increases too much in production.

is it possible to do something like this in Gatling :

loop
    rampup user and keep alive (10 over 10 seconds)
asLongAs(global.responseTime < 50 ms)

Thank you


Solution

  • you can't really script something like this - only fail actions based on response criteria or simulations based on assertions.

    The best way to achieve what you're after is to run a simulation where you gradually ramp the number of concurrent users and use the reports (particularly Response Time against Global RPS) to see at what point your response time starts exceeding 50ms