Gatling 性能测试

 test  gatling


Gatling Injection

https://gatling.io/docs/gatling/reference/current/core/injection/

setUp(
    scn.injectOpen(rampUsersPerSec(100).to(700).during(Duration.ofSeconds(60)))
).protocols(httpProtocol);
  1. constantConcurrentUsers(nbUsers).during(duration): Inject so that number of concurrent users in the system is constant
  2. rampConcurrentUsers(fromNbUsers).to(toNbUsers).during(duration): Inject so that number of concurrent users in the system ramps linearly from a number to another

Load profile

Fixed

Alt text

Ramp up

Alt text

Spike

Alt text

Peak

Alt text

Gatling Maven Plugin

https://github.com/gatling/gatling-maven-plugin