inject users until 20% of failedRequests

Hi all,

i’m a new user of gatling so I apologize if it’s a stupid question or I’ve missed it in the documentation.

My boss asked me to create a gatling simulation that inject users until the failedRequest percentage reach the 20%, stop the simulation and get the injection rate when the simulation ends without use external software.

My question is if there is a way to get this parameter while the simulation is still going or i have to find a way to obtain it with checks and incremental variables and if I can use a conditional statement on the injection setup(or to use a doIf on the scenario).

Thanks in advance,

FF