Running a load test for a specific duration and ignore results during the warm-up time.

Hi,

Does anyone how we can run a load test for a specific duration? I also want to ignore results during the warm-up time of the server.

My scenario is that I want to load test an API in a server (implemented in Java) and I want the test to run for 15 minutes. Then ignore the results of first 5 minutes considering the Java server warm-up time. I want to measure the requests/s and get the response time distribution when the server is in steady state.

This is what I do currently with Apache JMeter.

  • I set the users and ramp up period in thread group. Then enable scheduler and specify 900 seconds.

  • Use HTTP Sampler in the thread group.

  • Run the load test non-gui mode with JTL file and generate a JMeter Report Dashboard

  • Use another tool to remove first 5 minutes of results from JTL

  • Create a JMeter Report Dashboard from new JTL file.

I want to try this in Gatling, but I still couldn’t find a way to do it.

I really appreciate your suggestions to make this work.

Thank you!

Best Regards,

also want to ignore results during the warm-up time of the server.

Featured in FrontLine

Hi Stéphane,

So, you are saying that we can ignore results during the warm-up time of the server with Gatling FrontLine, right? Are there any plans to include that feature in open source version?

I also want to run the test for a specific duration. How can I do that in Gatling?

Hi,

Does anyone know how I can run the load test for a specific duration?

So, you are saying that we can ignore results during the warm-up time of the server with Gatling FrontLine, right?

Yes

Are there any plans to include that feature in open source version?

No

I also want to run the test for a specific duration. How can I do that in Gatling?

Have you read maxDuration’s documentation?

Hi Isuru,

You can achieve some of your requirement by using a client side monitoring using graphite and grafana Dashboard. You can chop-off your rampup duration in the dashboard, and can have number of custom graphs as well.

Kind regards,

-Pujitha.

The problem with Graphite, InfluxDb and similar tools that don’t support storing distributions is that they will mess up with your stats as they will compute percentile averages. And that’s super wrong: http://latencytipoftheday.blogspot.fr/2014/06/latencytipoftheday-you-cant-average.html

Hi Stéphane,

Thanks a lot for your reply. I actually read about maxDuration. I’m still new to Gatling and I still don’t know how to load test a scenario continuously with some users.

For example: I tested the same scenario in http://gatling.io/docs/current/quickstart/ and used maxDuration.

setUp(scn.inject(atOnceUsers(10))).maxDuration(1 minute).protocols(httpProtocol)

The problem is that, each request will be executed only 10 times and the test will finish before 1 minute.

In JMeter, we can have 10 users and execute requests in an infinite loop for a specific period. I want to know how this can be done in Gatling.

Thanks!

Best Regards,

Hi,

I managed to run the test as I wanted with the “forever” loop and “during” loop.

“forever” example:

val scn = scenario(“BasicSimulation”).forever {
exec(http(“echo”)
.post("/")
.headers(headers)
.body(StringBody("""{ “myContent”: “myHardCodedValue” }""")).asJSON
)
}

setUp(scn.inject(atOnceUsers(100))).maxDuration(2 minutes).protocols(httpProtocol)

“during” example:

val scn = scenario(“NettySimulation”).during(2 minutes) {
exec(http(“echo”)
.post("/")
.headers(headers)
.body(StringBody("""{ “myContent”: “myHardCodedValue” }""")).asJSON
)
}

setUp(scn.inject(atOnceUsers(100))).protocols(httpProtocol)